Documentation
¶
Overview ¶
Package smallpress makes a site from content/, as a site's own program asks it to: Main is that program's main. It writes the site to a folder (-out), as the Nix build does, or serves it while you write (-serve), built again on every request. With -receive it is the receiver, which takes posts over Micropub and commits them (receive.go).
Reading content/ is in package content, putting it together and checking it in site, Markdown in render, and every file but the pages in build. The pages are the site's own: Site.Pages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Site ¶
type Site struct {
// Pages writes the site's pages, from its templates and static files in
// assets: one at every address the site gives something (build.Verify),
// and the static files (build.Static). Every other file is the
// library's (build.Common).
Pages func(s *site.Site, assets fs.FS, o build.Options) (build.Files, error)
// Assets are the templates and static files, embedded in the program.
Assets fs.FS
// Options are what the site's checks need to know about its pages.
Options site.Options
}
A Site is what a site's own program gives Main: how its pages look.
Directories
¶
| Path | Synopsis |
|---|---|
|
Package build writes everything about a site that isn't how its pages look: the feed, the sitemap, each post's cite.bib and images, robots.txt, the files nginx includes, and the static files.
|
Package build writes everything about a site that isn't how its pages look: the feed, the sitemap, each post's cite.bib and images, robots.txt, the files nginx includes, and the static files. |
|
Package content reads content/: the site's facts, its posts, pages, threads and works.
|
Package content reads content/: the site's facts, its posts, pages, threads and works. |
|
Package dither gives a photo the site's look: grey, at most size pixels wide or high, in six shades with an ordered (Bayer 8×8) pattern, as hitherdither makes it of a grey photo.
|
Package dither gives a photo the site's look: grey, at most size pixels wide or high, in six shades with an ordered (Bayer 8×8) pattern, as hitherdither makes it of a grey photo. |
|
Command example is a whole site on small-press, for its tests and for a new site to start from: its pages (pages.go), templates and stylesheet (web/), and content/.
|
Command example is a whole site on small-press, for its tests and for a new site to start from: its pages (pages.go), templates and stylesheet (web/), and content/. |
|
web
Package web holds the templates and the stylesheet, embedded in the program.
|
Package web holds the templates and the stylesheet, embedded in the program. |
|
Package micropub is the receiver: it takes posts from the In the Open plugin over Micropub, with the references extension, and commits them to the site's repository.
|
Package micropub is the receiver: it takes posts from the In the Open plugin over Micropub, with the references extension, and commits them to the site's repository. |
|
Package render turns Markdown into HTML: CommonMark with GFM tables, strikethrough, footnotes and task lists.
|
Package render turns Markdown into HTML: CommonMark with GFM tables, strikethrough, footnotes and task lists. |
|
Package site is the site as a whole: posts newest first, their threads, the works they cite, which posts link to which, and every check that needs more than one file.
|
Package site is the site as a whole: posts newest first, their threads, the works they cite, which posts link to which, and every check that needs more than one file. |