This commit is contained in:
parent
4031223d27
commit
6250e04fb1
3 changed files with 16 additions and 21 deletions
|
|
@ -23,7 +23,7 @@ Before this refactor my blog site was generated using [Quartz 4](https://quartz.
|
|||
I will still recommend Quartz 4, if you want to quickly turn your Obsidian vault into a blog site, or if you want to build a wiki site with intertwined inner links jumping between notes. It is a free alternative to [Obsidian's official publish service](https://obsidian.md/publish) (which, aside from being overpriced in my opinion, doesn't even directly support custom domains and requires you to set up a reverse proxy for that purpose).
|
||||
|
||||
For my use case, I only want a basic SSG that accepts standard Markdown notes, with the only two add-ons being LaTeX math equation rendering and code block syntax highlighting. Then Quartz 4 starts to feel over-engineered and has too long a list of dependencies. It is also not straightforward to control how the generated site looks and feels, since the rendering pipeline is controlled by multiple TypeScript modules.
|
||||
By the way, [my homepage](https://www.yanlincs.com/) is basically built from scratch, generated by [a simple generator](https://github.com/Logan-Lin/homepage) I wrote in Python with the Jinja 2 template engine. The generated website also has zero dependency on external JavaScript or CSS libraries, making it blasting fast to load.
|
||||
By the way, [my homepage](https://www.yanlincs.com/) is basically built from scratch, generated by [a simple generator](https://git.yanlincs.com/yanlin/homepage) I wrote in Python with the Jinja 2 template engine. The generated website also has zero dependency on external JavaScript or CSS libraries, making it blasting fast to load.
|
||||
Of course the purpose of this blog site is very different from my homepage, seeing that this blog site is content-heavy, while my homepage just has to display lists of publications stored in a YAML file.
|
||||
Still, I always wanted this blog site to have as few dependencies as possible, and the styling to be directly controllable with HTML templates and CSS.
|
||||
|
||||
|
|
@ -56,13 +56,8 @@ Luckily, with a command line AI agent like Claude Code that can execute commands
|
|||
By the way this is also the first time I tried the "dangerously skip permissions" mode of Claude Code, it works well in this case that I do not have to manually allow it executing commands like `cp` and `mv`.
|
||||
|
||||
I also took this opportunity to switch from GitHub Pages to Cloudflare Pages for hosting the website.
|
||||
Cloudflare has built-in Zola template for page builds, but to use the latest version of Zola, I need to manually fetch the released binary using the following build command.
|
||||
|
||||
```bash
|
||||
curl -sL https://github.com/getzola/zola/releases/download/v0.22.1/zola-v0.22.1-x86_64-unknown-linux-gnu.tar.gz | tar xz && ./zola build
|
||||
```
|
||||
|
||||
Thanks to the fact that Zola is contained in a single binary, the build process is still relatively simple. Once setup, the deployment process is basically the same: after a commit is pushed to [this GitHub repo](https://github.com/Logan-Lin/blog), the website will be automatically rebuilt.
|
||||
Since I recently start to self-host my Git server using [Forgejo](https://forgejo.org/), I migrate the GitHub actions for building the website to run on my server.
|
||||
Once setup, the deployment process is basically the same: after a commit is pushed to [this remote Git repo](https://git.yanlincs.com/yanlin/blog), the website will be automatically rebuilt and deployed on Cloudflare.
|
||||
Compared to GitHub, Cloudflare should have a higher-performance global CDN, so the page should be faster and more stable to access, especially for my Chinese colleagues.
|
||||
|
||||
## Conclusion
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue