Documentation
¶
Overview ¶
Package share builds share buttons for a page: one plain link per service (or a button for "copy"), no third-party scripts, no cookies. Browsers with the Web Share API (phones) also get a "Share …" button for the system share sheet, shown by a few lines of script. Used by the blog (post pages) and the market (listing pages).
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Services = []string{"whatsapp", "telegram", "facebook", "x", "bluesky", "linkedin", "email", "copy"}
Services are the known service names, as written in Blog/Market { share: … }.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct {
Links []Link
URL string // absolute page URL, for copy and the system share sheet
Title string
Label string
Native string
Copied string
Icon template.HTML
Class string // CSS class prefix: <Class>, <Class>-btn, <Class>-<name> …
Box string // extra classes on the container, e.g. Bootstrap's "d-flex gap-2"
Btn string // extra classes on every button, e.g. Bootstrap's "btn btn-sm"
}
Data feeds the share buttons of a page.