~ajhalili2006's personal website, built with Zensical (successor of Material for Mkdocs) [old repo name got bugged while attempting to do manual knot migration via repo deletion]
andreijiroh.dev
zensical
mkdocs-material
website
GitHub Copilot / AI agent instructions#
Purpose: help an AI coding agent be immediately productive in this repository.
-
Big picture
- Static site built with MkDocs + Material theme. Sources live in
markdown/; generated site is written topublic/(mkdocs.yml). - Theme customizations and build hooks are in
overrides/(Python hooks + theme assets). - A parallel Gemini site lives in
gmi/(different format, separate publishing flow). - Cloudflare Pages / Workers integration: see
wrangler.jsonc(publishes assets frompublic/).
- Static site built with MkDocs + Material theme. Sources live in
-
Key workflows (concrete commands)
- Install dependencies (preferred):
pipenv install(orpip install -r requirements.txt). See Pipfile and requirements.txt. - Local preview:
mkdocs serve --watch overrides --watch-theme --livereloadorpipenv run dev(seePipfilescripts and mkdocs.yml). - Build site:
pipenv run buildorpipenv run build -f mkdocs.readthedocs.yml(build targets inPipfileandbuild.sh).build.shcopies favicon intopublic/after build. - Cloudflare deploy (manual):
npm run deploy->wrangler deploy(seepackage.jsonand wrangler.jsonc). CI deploy logic usesnpx wrangler pages publishinbin/deploy.shwhen running under CI. - CI: deployments happen via GitLab CI; do not rely on a repository-local Docker CI image.
- Install dependencies (preferred):
-
Project-specific conventions & patterns
- Content separation: author-managed Markdown in
markdown/is canonical. Do not editpublic/— it is generated. - Theme overrides and custom assets live in
overrides/; changes there affect build behavior and the site theme. - The build copies
assets/images/favicon.pngtopublic/favicon.icoafter building (seebuild.shandbin/build.sh). Keep favicon at that path. - Python environment targets Python 3.13 (see
Pipfile). The repo commonly usespipenvand a.venvpattern in local scripts (bin/localdev.sh). - CI: deployments happen via GitLab CI and
bin/deploy.sh(seewrangler.jsoncfor Cloudflare Pages configuration).
- Content separation: author-managed Markdown in
-
Integration points & external dependencies
- Cloudflare Pages / Workers via
wrangler/wrangler.jsonc(assets directory:./public). - CI builds run on GitLab. Avoid referencing the
docker/folder — it may be moved to a separate repo. npmis used only forwranglerdev/deploy and Docker convenience scripts (package.json).
- Cloudflare Pages / Workers via
-
Helpful files to inspect
- Repository README: README.md
- MkDocs config: mkdocs.yml
- Build scripts: build.sh and bin/build.sh
- CI/deploy: bin/deploy.sh and wrangler.jsonc
- Python deps: Pipfile and requirements.txt
-
What NOT to do
- Do not edit generated files under
public/directly — change sources inmarkdown/oroverrides/. - Avoid changing
site_dirorassetslayout without verifyingwrangler.jsoncandbin/deploy.shupdates.
- Do not edit generated files under
-
If you need clarification
- Ask the maintainer which mirror/CI (GitLab primary) you want to target before modifying CI configs.
-
Next steps
- If you want, I can expand the CI section with example GitLab job snippets or add examples for contributing patches.
-
Commit attribution
- Adopt the
Assisted-bycommit trailer for AI-assisted changes to comply with attribution policies. - Required trailer format (commit footer):
- Adopt the
Assisted-by: <Model Name> via <Tool Name>
- Example:
Assisted-by: GLM 4.6 via Claude Code
- Repository also requires Linux DCO sign-off for patches. Ensure commits include
Signed-off-by:lines in the footer alongsideAssisted-by:when applicable.
If any section is unclear or you want deeper examples (e.g., contributing workflow, CI job templates), tell me which area to expand.
- Example: GitLab CI snippet
- Minimal job that builds the site and publishes to Cloudflare Pages using
wrangler.
- Minimal job that builds the site and publishes to Cloudflare Pages using
stages:
- build
- deploy
build_site:
stage: build
image: node:20-bullseye
script:
- pip install pipenv
- pipenv install --deploy --ignore-pipfile
- pipenv run build
artifacts:
paths:
- public/
publish_pages:
stage: deploy
image: node:20-bullseye
dependencies:
- build_site
script:
- npm install -g wrangler
- npx wrangler pages publish public --project-name "$CF_PAGES_PROJECT_NAME" --branch "$CI_COMMIT_BRANCH"
only:
- main
- Notes: set
CF_PAGES_PROJECT_NAMEin CI variables; the repo'sbin/deploy.shalso contains an examplenpx wrangler pages publishinvocation used by CI.