Documentation ¶
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OpenGraph ¶
func OpenGraph(title, description, image, url string) Node
OpenGraph tags for a website. Title is always set, og:description, og:image, and og:url only if non-empty.
Example ¶
package main import ( "os" gallery "maragu.dev/gomponents-gallery" ) func main() { og := gallery.OpenGraph( "Partyhats for everyone!", "Bring your own glitter.", "https://www.example.com/partyhat.jpg", "https://www.example.com/partyhats-for-everyone") _ = og.Render(os.Stdout) }
Output: <meta property="og:type" content="website"><meta property="og:title" content="Partyhats for everyone!"><meta property="og:description" content="Bring your own glitter."><meta property="og:image" content="https://www.example.com/partyhat.jpg"><meta property="og:url" content="https://www.example.com/partyhats-for-everyone">
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.