Here is the source code of my blog.
It can be deployed to GitHub Pages!
It build on Next.js Framework, and using it's Static Export feature. Thanks to this, the website is very fast and SEO friendly.
Besides, it support GFM, KaTeX, Mermaid, and some self-defined feature.
This feature is based on remark and rehype ecosystems (unified plugins). You can find the plugin I have built in src/plugins
. (Sorry but I do not intent to publish them to npm.)
There is a set of GitHub Actions defined in .github/workflows
, which will automatically build and deploy the blog to GitHub Pages and AWS S3. I could preview it by opening a PR, and deploy it by merging into master
branch.
Yes, it's worth mentioning. You should have noticed that it's a bad idea to use non-trailing slash url style on S3, because it will not return some/page.html
when you visit some/page
. But it could be done by using lambda@edge.
If you are interested in this, you can find the code in another repo: RyoJerryYu/aws-blog-infra. I use Pulumi to define the infrastructure as code. And of cause, the infrastructure deployment is also fully automated by GitHub Actions.
(Pulumi is a great tool!)