How to add a ByteCode
Content lives in Git as Markdown. Russian pages are stored in docs/snippets; English pages live in docs/en/snippets.
Create
npm run snippet:newThe CLI prompts for the locale, slug, language, multiple tags, and code. Pass flags for automation:
npm run snippet:new -- \
--locale en \
--slug array-chunks \
--language typescript \
--tags "typescript,arrays" \
--title "Split an array into chunks" \
--description "Split an array into fixed-size chunks" \
--code-file ./snippet.ts \
--code-language tsOn creation, the CLI automatically records a created frontmatter field with the exact date, time, and timezone. You do not need to maintain the update time manually: the site build takes it from the file's latest Git commit. Before the first commit, it falls back to created.
Organization
The first catalog level is a language or technology. Independent dimensions use multiple tags, avoiding a deep category tree.
docs/snippets/<language>/<slug>.md
docs/en/snippets/<language>/<slug>.mdLocalized versions share the same slug, language, and technical tags.
Validate and remove
npm run snippets:validate
npm run snippets:list
npm run snippet:remove -- --locale en --slug array-chunksRun npm test, npm run typecheck, and npm run build before opening a pull request.