Files
jcoffey-dev 034b59dac0
ci / editor-ui (pull_request) Successful in 23s
ci / go (pull_request) Successful in 2m10s
Color code blocks when the site is built
A fenced block that names its language is colored at build time with
chroma, so pages need no script. The markup matches pymdownx.highlight
(div.highlight, Pygments class names), so MkDocs stylesheets work too, and
hl_lines="2 4-5" marks lines. Blocks with no language, text, or a language
chroma doesn't know come out exactly as before.

The starter and the docs pack (1.5.0) carry the colors: hues mixed into the
code's own text color, so they read on light and dark code blocks. Turn it
off with markdown.highlight: false.
2026-10-14 20:24:07 -07:00

43 lines
1.6 KiB
YAML

name: docs
version: 1.5.0
title: Documentation
description: A documentation section with a sidebar of parts and pages (as deep as you like), a breadcrumb, an on-this-page list, a page for each part, and previous and next links, in the order you set.
license: MIT
author: Coffey Labs LLC
collections:
docs:
layout: doc
list_layout: doc-index
sort: weight
search: true
paginate: 0 # the docs' pages are read through the sidebar, not paged
notes: |
Write pages under content/docs/, the docs' front page as
content/docs/_index.md (layout: doc-home for a cover with a card per part,
or doc for a page like the rest), and a heading's own page as _index.md in
its folder.
Then set the reading order in data/docs-nav.yaml. Each entry is a page's
source file, a heading over more entries (with a page of its own or not),
or a link elsewhere:
- docs/_index.md
- title: Install
page: docs/install/_index.md
blurb: Getting it onto your computer.
children:
- docs/install/linux.md
- title: On a Mac
page: docs/install/macos.md
- title: Coming from elsewhere
children: [docs/install/from-x.md, docs/install/from-y.md]
- title: Back to the main site
url: https://example.org/
That list draws the sidebar, the breadcrumb, each heading's page and the
previous and next links. Sites using the first format (part:, title:,
blurb:, pages: [names]) keep working.
For docs on a host of their own (docs.example.org/install/linux/ rather
than /docs/install/linux/), give the collection path: / in site.yaml.