gallery

package module
v0.0.0-...-7bd9b69 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 3, 2024 License: MIT Imports: 2 Imported by: 0

README

gomponents logo

GoDoc Go

Contribute your favorite gomponents and helper functions! Create a fork and open a PR.

go get maragu.dev/gomponents-gallery

Made with ✨sparkles✨ by maragu.

Does your company depend on this project? Contact me at markus@maragu.dk to discuss options for a one-time or recurring invoice to ensure its continued thriving.

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.

Directories

Path Synopsis
internal
assert
Package assert provides testing helpers.
Package assert provides testing helpers.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL