~siborgium/siborgium.xyz

rust: one more article
keys: new gpg key
share/rust: using serde_derive without precompiled binary

refs

trunk
browse  log 

clone

read-only
https://git.sr.ht/~siborgium/siborgium.xyz
read/write
git@git.sr.ht:~siborgium/siborgium.xyz

You can also use your local clone with git send-email.

#siborgium.xyz source code

#Disclaimer

I am not a JS programmer, I have never been one, and I sincerely hope I won't be one. This is my personal project, written in a famous get-shit-done style. I do not care about pretty commit history, docs and other eye-candy since this is not a "public" project.

Feel free to fork & improve though.

There may be more advanced and popular alternatives. Some of them I've considered too complicated, hard to customize, and some of them had a fatal flaw. Reinventing a wheel is fun, albeit non-profit.

#How to build?

Install nodejs and yarn with your package manager of choice. From the repository root invoke

% yarn install

to install pug -- the only (non-transitive) dependency of this project. Once you've got pug installed, run

% node process.js src <dst>

where <dst> is a directory of choice. You may use rsync(1), cp(1) or any other tool to copy the resulting file tree to your site root.

#How does it work?

Script recursively traverses given directory tree, copying everything it encounters while applying certain transformations based on file extension. More specifically, it recognizes .pug and .url files. The former gets compiled into HTML using pug, the contents of the latter are appended to the list of children of the current directory along with all of its subdirectories. Children are used to create links to external subpages (see base.pug).