Skip to main content
Version: main-dev

Customizing the Archive UI

The archive site generated by bootstrap archive is a standard Docusaurus + Tailwind project. You can modify any file — React components, CSS, configuration — and then sync your changes back to the cookiecutter template so they are reused in future scaffoldings.

Workflow

bootstrap archive --dev   →   edit UI files   →   bootstrap archive --sync-from

1. Scaffold a local working copy

regis-cli bootstrap archive ./my-archive --dev

This scaffolds the site, runs pnpm install, and starts a dev server at http://localhost:3000. A .regis-sync.json file is written to the project root — it stores the resolved cookiecutter context and is used later by --sync-from.

2. Iterate on the UI

Edit any file inside the working copy:

FilesTypical changes
src/components/ArchiveView.tsxLayout, columns, filtering logic
src/components/ScoreBadge.tsxScore display and color thresholds
src/css/custom.cssGlobal styles and Tailwind overrides
tailwind.config.jsTheme colors, fonts, breakpoints
docusaurus.config.tsSite title, tagline, navbar
docs/index.mdxArchive landing page content

3. Sync changes back to the template

regis-cli bootstrap archive --sync-from ./my-archive/my-archive/

The command compares each file in the working copy against the cookiecutter template source and writes back any differences.

Output example:

Sync: /path/to/my-archive → template

Updated (2):
✓ src/components/ArchiveView.tsx
✓ src/css/custom.css

Skipped — Jinja2 block tags, manual sync required (1):
⚠ .github/workflows/deploy.yml

Sync rules

Template file containsSync behavior
No Jinja2 variablesCopied back verbatim.
{{ cookiecutter.X }} referencesConcrete values (for example "RegiS Archive") are reverse-substituted back to {{ cookiecutter.project_name }} before writing.
{% block tags (conditionals, {% raw %})Skipped with a warning. Edit these files manually in the template if needed.

Manual sync for skipped files

The .github/workflows/deploy.yml and .gitlab-ci.yml files contain {% raw %} blocks (to escape GitHub Actions ${{ }} syntax) and are skipped automatically. If you need to modify these CI/CD files, edit the template source directly:

regis_cli/cookiecutters/archive/{{cookiecutter.project_slug}}/.github/workflows/deploy.yml
regis_cli/cookiecutters/archive/{{cookiecutter.project_slug}}/.gitlab-ci.yml

The .regis-sync.json file

Every bootstrapped working copy contains a .regis-sync.json file:

{
"template": "archive",
"context": {
"project_name": "My Archive",
"project_slug": "my-archive",
"description": "Archive viewer for regis-cli security analysis reports.",
"version": "0.19.0",
"platform": "github"
}
}

--sync-from reads this file to determine which concrete values map to which cookiecutter variables. Do not delete it from the working copy.