New(and Newer) Blog Architecture
Table of Contents
1. Branch
I've never fully learnt git before(only search for garbage when meeted with problem), so I recently read ProGit.
And I have some good ideas on my repo architecture: I should make use of branch, obviously.
1.1. Idea is:
seperate the source file(org) and the generated files(html, feed.xml)
so I can
1.1.1. clearly look at the diff
1.1.2. delete the generated files if I want
because those static files are really unecessary and takes much space
1.2. So what
1.2.1. use filter-branch
to remove the huge feed.xml
in the full history
1.2.2. ignore the generated files in the source repo
1.2.3. merge the source repo into site repo when I think it's ok
don't remove the source(org) in the site repo,
if build in main and checkout to site, those html will be overwritten
1.2.4. and I will use the same stratagy on my YW sub-website if there's no problem
I'm testing using CI on YW sub-site before deploying on this precious repo
1.3. Need Advice
I'm really new to do this. If you have a better idea, or this is somehow useful to you,
contact me, please!
2. CI
I previously thought of using CI to deploy blog, but I thought it too difficult, so just keep status quo.
But for many times I want to build a NixOS with wayland and lots of other big util(such as clang and metasploit),
if I build it on my machine, it will take up too many spaces and make no use except for building iso.
So it urged me to use a CI, after some trying, I found it not difficult and in fact, very useful!
I can have my huge feed.xml(which contains each of my post) dynamically generated by CI, it will save lots of spaces!
I will bundle my entire history mess and put it on release, like previous big change,
then use the Nuclear Option filter-branch
to delete those generated big files.