2.0 KiB
New(and Newer) Blog Architecture
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.
Idea is:
seperate the source file(org) and the generated files(html, feed.xml) so I can
clearly look at the diff
delete the generated files if I want
because those static files are really unecessary and takes much space
So what
use filter-branch
to remove the huge feed.xml
in the full history
ignore the generated files in the source repo
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
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
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!
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.