
This project is currently under active maintenance. To update, follow these steps:
First, verify the version number in package.json or review the changelog here or at Release.
The project version number is only incremented when the configuration file structure undergoes structural changes. Project configuration files refer to those related to website layout and content, including astro.config.mjs, src/config.ts, src/content.config.ts, and files within the src/i18n/ folder.
Blog text, images, and other content are stored in the src/content/, src/assets, and public folders.
You can directly clone this project, then overwrite the new project with your original configuration files. Run pnpm install to install dependencies, followed by pnpm build for local compilation. Finally, execute pnpm preview to preview the compiled project.
When updating inside this repository, run pnpm momo update: it reads the latest release, compares it with the version in package.json, downloads that version’s source, keeps your own posts and images (src/content, src/assets, public) and src/config.ts, overwrites the rest of the code, deletes files the new version no longer ships and installs dependencies, then lists the configuration files that need to be merged by hand. Deletion only covers files that existed in the previous template but were removed upstream (tracked in .momo/manifest.json; the first update reads the file list of your current version tag instead), so files you added yourself are never touched, and deleted files are backed up next to the overwritten ones under .backup/update-<timestamp>/overwritten/. Run pnpm momo update --dry-run first to preview the changes, add --no-delete to only overwrite, and pnpm momo restore <backup name> rolls the configuration back.
Whenever the version number changes, the modification log will be updated here. Refer to the specific log entries to modify the corresponding configuration files.
Below are general modification suggestions.
astro.config.mjs Modifications: Typically just overwrite the file. Its site and i18n fields are read from siteConfig.rootSiteUrl, i18nConfig.defaultLanguage and i18nConfig.supportedLanguages in src/config.ts.config.ts Modifications: Update config.ts by adding or modifying configuration items as required.content.config.ts Modifications: Typically involves adding new frontmatter configurations to articles. Add the required new configuration items to articles as specified.src/i18n/ Modifications: Generally involves adding new internationalization translations; simply overwrite the files. Note that the Cover text of each page (cover.title / cover.subTitle) has moved into i18nConfig.translations in src/config.ts — edit it there.Version numbers follow the
YY.MM.DDformat
Happy National Day!
Cover title and subtitle centered and enlarged on top of an adjustable black mask; scrolling down smoothly moves the title back to its place, restores its size and colour, and fades the photo into a faint backdrop. Later pagination pages plus the archive / about / friends and post pages all get a very faint version of the photo as their background, and its blurred placeholder is generated at build time — nothing to prepare by handsiteConfig.theme.photoCover (switch / photo path / mask) and siteConfig.theme.overlayScrollbars (switch / auto-hide / thickness), editable in src/config.ts or in the CMS; new translation button.scrollDownpnpm momo update now also removes files that no longer exist in the new version (add --no-delete to only overwrite), pnpm momo clean also clears node_modules/.astro, and pnpm momo doctor flags a leftover <ClientRouter />astro.config.mjs (client-side navigation now uses swup), src/config.ts (two new theme switches) and src/i18n/ (a new button.scrollDown translation) — merge them as prompted{target="_blank"} straight after a link to open it in a new tab, with an arrow icon appended after the link; only target / rel / class are recognised, rel always keeps noopener / noreferrer, and links holding only an image get no iconsrc/plugins/ moved from .mjs to .ts (proper types, trimmed comments), and relative imports between plugins now need an explicit .ts extension; the CMS preview loads .ts natively in Node, so it needs Node ≥ 22.18script/newpost.js and the pnpm newpost script (it wrote frontmatter with the long out-of-date date / slug fields; create posts with pnpm momo new or the CMS instead)astro.config.mjs (plugin imports use .ts) and package.json (adds the @types/hast, @types/mdast, @types/unist, @types/node and vfile dev-dependencies and drops the newpost script); overwrite them, run pnpm install, and delete the leftover .mjs / .js files in src/plugins/title instead/public paths are read from disk, while remote images are fetched as a header only (512 KB max, 5 s timeout, 6 concurrent); on failure the row height comes from the other imagespnpm momo update no longer updates .github, .vscode or .idea.JPG) not being foundastro.config.mjs (the collage gained the public directory lookup), so simply overwrite itpnpm momo update is now release-based: it no longer depends on local git and keeps your own posts, images and src/config.tspnpm momo audit command for re-measuring the first-paint cost of a buildsrc/config.ts configuration file by adding the theme.imageCollage field; you must add this new field when updating, while every other file can simply be overwrittensiteConfig.expressiveCode in src/config.tsphotoswipe): wheel / button / double-click / pinch zoom, drag to pan, arrow keys or swipe to switch, Esc to close, with fly-in and fly-out animations#/config) for editing src/config.ts visually; the archive page is now server-renderedsitemap.xml and robots.txtastro.config.mjs configuration file, adds the new config file ec.config.mjs and adds siteConfig.expressiveCode to src/config.ts; it also changes the dependencies (adds astro-expressive-code, removes photoswipe), so add the new fields and run pnpm install when updatingThis update contains breaking configuration changes. Please read the release notes below carefully!
config.ts configuration file to centrally manage the default language, supported languages, and cover text for each pagepnpm momo, which supports functions such as backing up, restoring, and updating configurationssrc/config.ts, src/i18n/language/*.ts, and astro.config.mjs:
src/config.ts: Added i18nConfig and added rootSiteUrl to siteConfigsrc/i18n/language/*.ts: Removed the original cover field; now referenced from config.tsastro.config.mjs: Updated the site and i18n sections to reference the configuration in src/config.tsnode_modules, .astro, dist) and run pnpm install again. You can use pnpm momo clean --all to do this quicklyThis is a breaking update. Please read the release notes below carefully!
v5 branch and will no longer be maintained/node_modules) before you can compile and preview locallycontent.config.ts and astro.config.mjsconfig.ts configuration file by adding the theme.postCard field; you must add this new field when updatingsrc/i18n/, adding fields such as comments.verificationRequired; all other fields remain unchanged. When making modifications, simply add the new fieldsLQIP low-quality image placeholder featureastro.config.mjs configuration file to include the remarkLqip plugin; it also modifies the config.ts configuration file by adding fields such as theme.LQIP. When updating, you must add these new fields.astro.config.mjsastro.config.mjs by changing how AdmonitionComponent is imported; corresponding changes must be madesrc/i18n/, adding fields such as comments.write; all other fields remain unchanged. When making modifications, simply add the new fieldsconfig.ts configuration file by adding the theme.AOS and comments.platform fields; these new fields must be added when updatingastro.config.mjs configuration file and adds a new dependency, @iconify-json/fluent. You must add the corresponding fields and run pnpm install.src/i18n/language/en.ts by changing the themeInfo.system field; all other fields remain unchanged. When updating, you only need to modify the fields that have changed.src/i18n/ by adding the comments.replyTo field; all other fields remain unchanged. To apply the changes, simply add the new fieldsrc/i18n/ by adding the themeInfo field; all other fields remain unchanged. To apply the changes, simply add the new field26.3.11src/i18n/. We recommend using the latest version and updating the cover.title and cover.subtitle fields with your own information.
Loading comments...