Skip to content
app.py
import json
from pathlib import Path
def load(path: Path) -> dict:

Returns the parsed file as a dict.

with path.open() as fh:
return json.load(fh)
cfg = load(Path("config.toml"))
cfg = load(Path("config.json"))
Warning:print(cfg["name"]) KeyError if unset
  1. Returns the parsed file as a dict.

starlight-codeblocks

This plugin adds 27 features to the Expressive Code blocks of Starlight and Astro sites. Use them to enrich code blocks. Using an agent? Point it at the bundled skill.

This website is agent-friendly: each page has a Markdown version at the same address with .md at the end, such as install/starlight.md. llms.txt lists every page, and llms-full.txt has every page in one file.

Using an agent? Point it at the bundled skill. The skill tells the agent which feature suits each use, and how to write it.

This plugin builds on the excellent Expressive Code, which renders every code block in Starlight.

The [!code …] comment notation comes from the Shiki transformers and VitePress. Thank you to both projects. Most code blocks from VitePress work here unchanged.