|
|
||
|---|---|---|
| .gitea/workflows | ||
| .vscode | ||
| fixtures | ||
| plugins | ||
| prompts | ||
| public | ||
| scripts | ||
| src | ||
| svelte-components | ||
| .dockerignore | ||
| .gitignore | ||
| astro.config.mjs | ||
| Dockerfile | ||
| Dockerfile.oauth | ||
| Makefile | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| site.config.yaml | ||
| svelte.config.js | ||
| tsconfig.json | ||
| VERSION | ||
Website
Astro website with Starlight documentation, Sveltia CMS administration and a local compatibility layer for MkDocs Material-style Markdown.
Project Structure
The project is an Astro site with Starlight documentation, Svelte islands, lightweight server endpoints and one central configuration file.
/
├── site.config.yaml
├── public/
├── src/
│ └── pages/
│ └── index.astro
└── package.json
Structural site settings live in site.config.yaml: base path, public URL, site name, theme mode, menus, Git repository, Gitea app id, SEO defaults, and Sveltia CMS collections.
Usage
make is the supported entry point for day-to-day usage. Run every command from the project root.
| Command | Action |
|---|---|
make |
Show available tasks |
make install |
Install dependencies |
make dev |
Start the Astro development server |
make build |
Generate tags and build the site to dist/ |
make preview |
Build and preview the production site |
make rebuild |
Clean generated artifacts, then build |
make clean |
Remove generated build/runtime artifacts |
make image |
Build the Docker image |
make image_run |
Run the Docker image for local testing |
make image_stop |
Stop the local Docker test container |
make tags |
Rebuild the generated tag index |
make status |
Show the repository Git status |
make astro ARGS="-- --help" |
Run the Astro CLI through the Makefile |
make import MKDOCS=/path/site |
Import a MkDocs site, then rebuild tags |
make import_test |
Verify the MkDocs Material importer |
make upgrade |
Upgrade FrontMark core code from reference |
The npm scripts remain implementation details used by the Makefile.
MkDocs Material Import
make import MKDOCS=/path/site reads mkdocs.yml or mkdocs.yaml, imports Markdown pages from docs_dir, copies documents/, images/ and videos/, skips tags.md, overrides/, js/ and css/, and updates site.config.yaml with site metadata, logo/language and the sidebar menu derived from nav.
The importer respects include_dir_to_nav sorting options:
plugins:
- include_dir_to_nav:
reverse_sort_file: true
reverse_sort_directory: true
MkDocs Material theme internals, palettes, features, plugins, markdown extensions and extra JavaScript/CSS are not migrated; FrontMark owns those layers.
FrontMark Upgrade
make upgrade updates the FrontMark engine from the reference repository:
make upgrade
It clones https://gitea.newkube.ia86.cc/sigMAX/Image_frontmark, overlays core code, then runs npm install by default.
Protected site-specific paths are not touched: site.config.yaml, Makefile, VERSION, src/content/, src/imported/, and site assets such as public/brand/, public/images/, public/videos/, public/media/, public/documents/, public/icons/, public/uploads/, generated search/admin/svelte output, dist/, .astro/ and node_modules/.
Useful options:
make upgrade UPGRADE_DRY_RUN=1
make upgrade UPGRADE_REF=main
make upgrade UPGRADE_INSTALL=0
make upgrade UPGRADE_REPO=https://example.test/FrontMark.git
The Docker image defaults to frontmark-website:local, and make image_run exposes the container on http://127.0.0.1:4321. Override the usual Make variables when needed:
make image IMAGE=frontmark-website:test
make image_run IMAGE=frontmark-website:test PORT=4325
make image_stop
CI/CD pipelines can also run a plain docker build -t image-name .; the Dockerfile computes the version tag from Git during the build and stores it in VERSION for the runtime image.
Site Configuration
To build the site under a prefix, change site.base in site.config.yaml:
site:
base: /frontmark
Use an empty site.base to publish at the domain root:
site:
base: ""
Then run make build. Set SITE_CONFIG_FILE=/path/to/site.config.yaml when the runtime config is mounted outside the project directory.
Sveltia CMS
Sveltia configuration is generated from site.config.yaml at runtime:
- JSON config:
/frontmark/admin/config.json - YAML config:
/frontmark/admin/config.yml - CMS bundle:
/frontmark/admin/sveltia-cms.js
The old static files in public/admin/ are generated artifacts and should not be edited by hand.