English | 简体中文
Hello, this is my personal blog codebase which is forked from AstroPaper.
What are the differences compared to AstroPaper?
- Integration with astro-i18next (requires a significant amount of work)
- For the convenience of toggling languages and the freedom to rename files, this repository utilizes
frontmatter.permalink
instead ofpost.slug
. This is because Astro does not permit identical slugs for different language versions of the same post so far. This also caused a minor cache issue on the local development server.
- For the convenience of toggling languages and the freedom to rename files, this repository utilizes
- Refactored tags
- Toggle the dark theme using only CSS variables to implement:
- Dual code highlighting themes
- Dual diagram themes
- External links open in new tabs by default
- Mermaid integration with dual themes
- Floating table of contents using tocbot, rather than having it in the header
- Giscus integration for comments and discussions
- MDX integration for advanced markdown features for article collections
- rehype-autolink-headings integration
- Planned integration with astro-icon or other icon libraries to avoid the need for manually copying SVGs (not yet implemented)
public/locales
does not support hot reloading for now, moving it to the src directory might be helpful.- When developing locally, it's common that the multilingual versions of articles do not match the website settings. Opening and making a modification to the corresponding file to trigger hot reloading can solve this issue; this problem does not exist in production environments.
On GitHub: Just Click "Sync fork"
On your local machine:
# add a remote
git remote add upstream https://github.com/bowencool/blog.git
# merge upstream/main into your branch
git merge upstream/main --no-ff
# or rebase your branch onto upstream/main
git rebase upstream/main && git push -f