- Vue 60.3%
- JavaScript 34.9%
- CSS 4.3%
- HTML 0.5%
| archetypes | ||
| content | ||
| scripts | ||
| src | ||
| static/img | ||
| .gitattributes | ||
| .gitignore | ||
| .gitmodules | ||
| index.html | ||
| og_base.png | ||
| package-lock.json | ||
| package.json | ||
| pnpm-lock.yaml | ||
| pnpm-workspace.yaml | ||
| postcss.config.js | ||
| README.md | ||
| tailwind.config.js | ||
| vite.config.js | ||
ADMStaff website
The site is now a Vue 3 single-page application built with Vite, Vue Router, Vue I18n, Tailwind CSS and DaisyUI.
Project layout
src/: Vue application, routes, views, components and composables.content/: Markdown source files for pages, events, projects and the wiki.generated/wiki/: JSON generated from the wiki Markdown files.static/: public files copied unchanged todist/(for examplestatic/img).public/og/: generated Open Graph images.scripts/: content creation, wiki compilation and OG image generation scripts.dist/: production build output; it is generated and should be deployed, not edited manually.
The application uses HTML5 history routing. The production web server must
serve dist/index.html as a fallback for client-side routes such as
/projects/sasso and /wiki/home.
Content
Content is stored in content as Markdown. Localized English content
lives under content/en/; when an English translation is missing, the default
content is used as a fallback.
Create a new page from the default archetype with:
pnpm new-content events/my_new_event
The command creates content/events/my_new_event.md and fills these front
matter defaults:
title: derived from the file name.date: current local timestamp with timezone.author:ADMStaff.
Optional overrides are supported:
pnpm new-content projects/my_tool --title "My Tool"
Attachments that should be part of the build belong in static/img and can be
referenced from Markdown with /img/filename.ext.
Wiki
The wiki is a Git submodule at content/wiki/adm.wiki. Its Markdown pages are
compiled into generated/wiki/ before development and production builds.
Initialize or update the submodule with:
git submodule update --init --recursive
git -C content/wiki/adm.wiki pull
To compile the wiki manually:
node scripts/compile-wiki.js
Wiki images referenced by the generated HTML use paths under
/content/wiki/adm.wiki/images/. They must therefore be made available by the
production server in addition to the dist/ files, or be moved to static/
and referenced from /img/.
Commands
pnpm install
pnpm dev
pnpm build
pnpm preview
pnpm new-content events/my_new_event
pnpm format
pnpm dev: runs the Vite development server. Thepredevhook first generates OG images and compiles the wiki.pnpm build: generates OG images, compiles the wiki, then createsdist/.pnpm preview: serves the generateddist/build for local verification.pnpm new-content: creates a Markdown file fromarchetypes/default.md.pnpm format: formats source code, Markdown and configuration files.
Deploy
Build locally and publish the resulting dist/ directory on the production
server:
pnpm install
pnpm build