Documentation
¶
Overview ¶
Package seo provides SEO meta tag and structured data management for ForgeUI.
Index ¶
- func AlternateLink(lang, url string) templ.Component
- func DNSPrefetch(url string) templ.Component
- func GenerateSitemap(urls []SitemapURL) string
- func JSONLDNode(data StructuredData) templ.Component
- func MetaTagsNode(tags MetaTags) templ.Component
- func Preconnect(url string) templ.Component
- func RSSLink(title, url string) templ.Component
- func SitemapLink(url string) templ.Component
- type BreadcrumbItem
- type MetaTags
- type SEO
- type SitemapURL
- type StructuredData
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AlternateLink ¶
AlternateLink generates an alternate language link tag.
func DNSPrefetch ¶
DNSPrefetch generates a DNS prefetch link tag.
func GenerateSitemap ¶
func GenerateSitemap(urls []SitemapURL) string
GenerateSitemap generates a basic sitemap structure.
func JSONLDNode ¶
func JSONLDNode(data StructuredData) templ.Component
JSONLDNode generates JSON-LD structured data node.
func MetaTagsNode ¶
MetaTagsNode generates meta tag nodes.
func Preconnect ¶
Preconnect generates a preconnect link tag for external domains.
func SitemapLink ¶
SitemapLink generates a sitemap link tag.
Types ¶
type BreadcrumbItem ¶
BreadcrumbItem represents a breadcrumb item.
type MetaTags ¶
type MetaTags struct {
Title string
Description string
Keywords []string
Author string
Canonical string
OGTitle string
OGDescription string
OGImage string
OGType string
OGURL string
OGSiteName string
TwitterCard string
TwitterSite string
TwitterCreator string
TwitterTitle string
TwitterDescription string
TwitterImage string
Robots string
GoogleBot string
BingBot string
}
MetaTags contains SEO meta tag configuration.
type SEO ¶
type SEO struct {
*plugin.PluginBase
}
SEO plugin.
type SitemapURL ¶
SitemapURL represents a URL in a sitemap.
type StructuredData ¶
StructuredData contains JSON-LD structured data.
func ArticleSchema ¶
func ArticleSchema(headline, description, image, datePublished, author string) StructuredData
ArticleSchema creates Article structured data.
func BreadcrumbSchema ¶
func BreadcrumbSchema(items []BreadcrumbItem) StructuredData
BreadcrumbSchema creates BreadcrumbList structured data.
func OrganizationSchema ¶
func OrganizationSchema(name, url, logo string) StructuredData
OrganizationSchema creates Organization structured data.