This repository contains the source files for the ECOS Website, generated with MkDocs Material + Tailwindcss as a bilingual site (web/src/zh and web/src/en) with a lightweight frontend asset pipeline for consistent local preview and production output.
Before running commands, make sure your environment has Python 3.10+, Node.js 22+ and Git.
-
Setup
Initialize shared repositories (
resandtpl) and prepare the local project workspace.cd web make setup -
Edit
Please follow the workflow to add new images or videos:
- Upload lossless original images (JPG or PNG format) or pre-compressed videos (MP4 format) to the corresponding directory under
web/res/img. - Run
make gen-webpcommand in thewebdirectory, and scripts inweb/tplwill automatically convert original images to smaller WEBP images (lossy compression). - Reference the generated WEBP images in your Markdown files.
Note: running
make gen-webpcommand is optional. If you runmake serve-webcommand in the next Preview step, the system will also convert images automatically. Video compression is not currently supported by script, so please compress videos in advance before uploading them toweb/res/img. - Upload lossless original images (JPG or PNG format) or pre-compressed videos (MP4 format) to the corresponding directory under
-
Preview
Start a local development server for the Chinese site (default language).
cd web make serve-webStart a local development server for the English site.
cd web make serve-web MKDOCS_LANG=en -
Build
Generate dynamic assets and build the Chinese static site output.
cd web make gen-web make build-webGenerate dynamic assets and build the English static site output.
cd web make gen-web MKDOCS_LANG=en make build-web MKDOCS_LANG=en -
Deploy
If you modify files in local
web/resorweb/tpl(for example, add new images, templates, scripts, or styles), commit and push those changes to their corresponding repositories first.Commit and push your changes in
web/srcto the repository. Then Vercel (a cloud platform designed to simplify web development) will detect the update of the repository, automatically build and deploy the website according tovercel.jsonconfig file. -
Clean
Remove generated files and local build artifacts for a fresh rebuild.
cd web make clean