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:
| Files | Typical changes |
|---|---|
src/components/ArchiveView.tsx | Layout, columns, filtering logic |
src/components/ScoreBadge.tsx | Score display and color thresholds |
src/css/custom.css | Global styles and Tailwind overrides |
tailwind.config.js | Theme colors, fonts, breakpoints |
docusaurus.config.ts | Site title, tagline, navbar |
docs/index.mdx | Archive 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 contains | Sync behavior |
|---|---|
| No Jinja2 variables | Copied back verbatim. |
{{ cookiecutter.X }} references | Concrete 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.