site

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2026 License: Apache-2.0 Imports: 16 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

cernly.dev

The developer docs. Markdown pages in pages/, built with:

go run ./cmd/cernly-site     # writes site/public

Each page starts with front matter (title, description, path, section, order, commands) and opens with a one-line TL;DR. The build writes the HTML, each page's Markdown at <path>index.md, llms.txt, llms-full.txt, sitemap.xml, JSON-LD, and copies schema/ to /schema/ and the agent skills in skills/ to /skills/. agents.md holds the notes for AI agents that open llms.txt and llms-full.txt. A link to a page that does not exist fails the build.

Hosted on a VPS behind Cloudflare at https://cernly.dev, as static files.

Documentation

Overview

Package site builds the developer docs at cernly.dev from Markdown pages: HTML in the brand's layout, each page's Markdown beside it, llms.txt, llms-full.txt, sitemap.xml, JSON-LD and the JSON Schemas. Same sources, same bytes: no dates or build ids in the output.

Index

Constants

This section is empty.

Variables

View Source
var Sections = []string{"Use", "How", "Project"}

Sections, in the order llms.txt and the sidebar list them. Pages without a section are the home page and 404.

Functions

func Build

func Build(opt Options) error

Build writes the site into opt.Out.

Types

type Options

type Options struct {
	// Src holds layout.html, static/ and the optional agents.md, the notes
	// for AI agents that open llms.txt.
	Src string
	// Pages holds the Markdown pages; default Src/pages.
	Pages string
	// Schema holds the JSON Schemas, served at /schema/.
	Schema string
	// Skills holds agent skills, served at /skills/; skipped when empty or
	// missing.
	Skills string
	// Out is emptied and written.
	Out string
}

Options name the folders a build reads and writes.

type Page

type Page struct {
	Title, Description, Path, Section string
	Order                             int
	// Commands are the CLI commands the page documents, for the flag check.
	Commands []string
	// Markdown is the page without its front matter.
	Markdown []byte
	// File is where the page was read from, for error messages.
	File string
}

Page is one Markdown file under the pages folder.

func ReadPages

func ReadPages(dir string) ([]Page, error)

ReadPages reads every .md file under dir: home first, then by section, order and path, 404 last.

Jump to

Keyboard shortcuts

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