A minimalist blog template
Momo originates from Xiaohongshu’s 📕, serving as every new user’s initial nickname, symbolizing a fresh start. The blog’s design philosophy stems from this concept, beginning with simplicity to strike a balance between complex functionality and minimalist aesthetics.
sitemap.xml and robots.txtpnpm cms to edit posts with live preview (sharing the same Markdown pipeline as the blog) instead of editing Markdown by handpnpm momo provides config backup/restore, one-command updates, new post creation and environment checkssrc/plugins/ pipeline are both written in TypeScriptRequirements: Node.js >= 22 (24 LTS recommended; the local CMS needs >= 22.18) and pnpm
git clone https://github.com/Motues/Momo.gitcd Momopnpm install to install dependencies (use npm install -g pnpm to install pnpm)pnpm dev to start the development serverRefer to the Configuration Guide. For detailed information, visit Momo and read the corresponding articles.
Site information, theme switches, languages and the Cover text of each page are configured in src/config.ts; the site and i18n fields of astro.config.mjs read from that file automatically.
Refer to the Update Guide for instructions on updating your project. Visit Momo for detailed information.
Run pnpm momo update to do it automatically: it checks the GitHub releases, downloads the new source, backs up, overwrites the code, deletes files the new version no longer ships and installs dependencies, then lists the config files that need manual merging. Your own posts and images (src/content, src/assets, public) and src/config.ts are always kept; deletion only covers files that existed in the previous template but were removed upstream (tracked in .momo/manifest.json, so files you added yourself are never touched — add --no-delete to keep them and only overwrite). Add --dry-run to preview the changes without writing anything.
Below are some branches that are maintained on an irregular basis; we cannot guarantee that they will remain in sync with the main branch.
memos: Implements the Memos card featurev5: Version v5—no longer supportedAll commands below can be executed in the root directory
| Command | Function |
|---|---|
pnpm install | Install dependencies |
pnpm dev | Start local server at http://localhost:4321 |
pnpm build | Build release version to ./dist (including the pagefind search index) |
pnpm preview | Preview built release version |
pnpm astro ... | Run astro commands, e.g., astro add |
pnpm cms | Start the local CMS at http://localhost:5188 (run pnpm install first) |
pnpm momo new [path] | Create a new post; the path defaults to a date based one, e.g. pnpm momo new docs/test |
pnpm momo backup | Back up src/config.ts to .backup/ (add --config for every config file, --all to also include posts and images) |
pnpm momo restore [name] | Restore from a backup (the latest one by default) |
pnpm momo update | Update the template code from the GitHub releases and sync dependencies (keeps your own posts and images, deletes files dropped by the new version; --dry-run previews the changes, --no-delete only overwrites) |
pnpm momo clean | Remove build output and caches (add --all to also remove node_modules) |
pnpm momo doctor | Check the environment, dependencies and project status |
pnpm momo --help | Show every momo command and option |