From 386f08b62f14847d785fa7c175a9c19afd50b8cb Mon Sep 17 00:00:00 2001 From: Phil Bajsicki Date: Mon, 18 Nov 2024 20:09:31 +0100 Subject: [PATCH] Update --- content/_index.md | 2 +- content/blog/I-love-emacs.md | 2 +- content/blog/LLM-Note.md | 2 +- content/blog/_index.md | 62 ++++++++++++++++++- content/blog/a-kind-view-of-business.md | 2 +- content/blog/a-new-look.md | 2 +- content/blog/avoidance-in-business.md | 2 +- content/blog/brain-lube-2.md | 2 +- content/blog/brain-lube-3.md | 2 +- content/blog/brain-lube.md | 2 +- content/blog/call-it-a-day.md | 2 +- content/blog/efficiency-typing.md | 2 +- content/blog/foss-subscription-model.md | 2 +- content/blog/games-yakuza.md | 2 +- content/blog/haxe-vscode.md | 2 +- content/blog/lists-self-promotion.md | 2 +- content/blog/mastering-emacs.md | 2 +- .../blog/misskey-resetting-admin-password.md | 2 +- content/blog/moving-to-hugo.md | 2 +- content/blog/my-favorite-factorio-mods.md | 2 +- .../blog/new-keyboard-layout-colemak-dh.md | 2 +- content/blog/on-problems.md | 2 +- content/blog/overcoming-rsi.md | 2 +- content/blog/realistic-deadlines.md | 2 +- content/blog/saas-business-foss.md | 2 +- content/blog/shared-hosting-scam.md | 2 +- content/blog/shiny-objects-and-learning.md | 2 +- content/blog/vps-is-my-new-friend.md | 2 +- content/blog/vps-setup.md | 2 +- content/blog/wisdom-from-a-satyr.md | 2 +- content/blog/words-in-a-moment-of-peace.md | 2 +- content/blog/zucc-may-be-lying.md | 2 +- content/contact/index.md | 2 +- 33 files changed, 93 insertions(+), 33 deletions(-) diff --git a/content/_index.md b/content/_index.md index aef42ec..66eef0e 100644 --- a/content/_index.md +++ b/content/_index.md @@ -1,7 +1,7 @@ +++ title = "Home" layout = "index" -lastmod = 2024-11-18T20:00:50+01:00 +lastmod = 2024-11-18T20:09:29+01:00 draft = false [menu] [menu.nav] diff --git a/content/blog/I-love-emacs.md b/content/blog/I-love-emacs.md index 8582f82..8f8da43 100644 --- a/content/blog/I-love-emacs.md +++ b/content/blog/I-love-emacs.md @@ -1,7 +1,7 @@ +++ title = "I really, really like Emacs" publishDate = 2022-10-01T00:00:00+02:00 -lastmod = 2024-11-18T20:00:51+01:00 +lastmod = 2024-11-18T20:09:29+01:00 tags = ["orgmode"] categories = ["emacs", "tech"] draft = false diff --git a/content/blog/LLM-Note.md b/content/blog/LLM-Note.md index 1612500..c27e274 100644 --- a/content/blog/LLM-Note.md +++ b/content/blog/LLM-Note.md @@ -1,7 +1,7 @@ +++ title = "Note about LLM's and training data" publishDate = 2023-03-09T00:00:00+01:00 -lastmod = 2024-11-18T20:00:50+01:00 +lastmod = 2024-11-18T20:09:29+01:00 tags = ["copyright", "thieves"] categories = ["llm", "tech"] draft = false diff --git a/content/blog/_index.md b/content/blog/_index.md index f0766cf..2fe95ec 100644 --- a/content/blog/_index.md +++ b/content/blog/_index.md @@ -1,6 +1,6 @@ +++ title = "Blog" -lastmod = 2024-11-18T20:00:50+01:00 +lastmod = 2024-11-18T20:09:29+01:00 draft = false meta = true type = "list" @@ -627,6 +627,66 @@ Still, all things considered, I am quite happy, and working on this website has ### Some improvements for my ox-hugo set-up hugoweborgmode@emacs {#some-improvements-for-my-ox-hugo-set-up} +Probably not the most inventive thing I've done, but I slightly improved my set-up quite a bit. + +It's all in this little snippet of elisp: + +```emacs-lisp +(delete-directory "~/git/phil/bajsicki.com/content" :recursive) +(org-hugo-export-wim-to-md :all-subtrees) +(cd "~/git/phil/bajsicki.com") +(pwd) +(magit-call-git "commit" "-a" "-m" "Update") +(magit-call-git "push") +``` + +One thing that bothered me somewhat about the way ox-hugo handles straggler files is that if I ever removed, renamed or otherwise messed with the structure that already existed, it wouldn't handle the redundant files for me. + +E.g. if I deleted a post in my org-mode file (from which this website is generated), ox-hugo would happily leave it hanging in my \`content/\` directory, damning me to eternal suffering. + +However, using this simple elisp, I can easily delete the content directory, and rebuild it from scratch to ensure that my website is _always_ up to date. + +I have yet to put it into a function, or do anything. `C-c C-c` works just fine for me, as it's sitting at the top of the file in a \`:noexport:\` block. + +Another issue I solved was that the git `post-receive` hook wouldn't run properly. It took me a short bit but eventually I found that I need to run it in a subshell, and unset the \`GIT_\` env variables to ensure that git doesn't get confused about where to pull the updates from. + +```sh +#!/bin/bash +# Directory on the server where the website will be mapped. +export GIT_WORK_TREE=/srv/bajsicki.com/ +cd $GIT_WORK_TREE +echo "post-receive: Generating https://bajsicki.com with Hugo in $(pwd)" + +# Remove any files already in the public directory, a fresh copy will be generated by hugo +echo "post-receive: Cleaning the /public and /content directory to ensure we're in line." +rm -rf public/ && echo "removing /public in $(pwd)" +rm -rf content/ && echo "removing /content in $(pwd)" +# Update the modules in case of changes and pull the new pages +echo "post-receive: pulling git repo and submodules in $(pwd) w/ subshell" +( + unset $(env | sed -ne 's/^\(GIT_.*\)=.*/\1/p') + cd /srv/bajsicki.com + git pull origin main --recurse-submodules --force +) + +# Generate the site with hugo +echo "post-receive: running hugo in $(pwd)" +hugo + +# Fix any permission problems. +echo "post-receive: fixing permissions in $(pwd)" +find public -type f -print | xargs -d '\n' chmod 644 +find public -type d -print | xargs -d '\n' chmod 755 + +echo "post-receive: Hugo site deployment in $(pwd) complete" +``` + +This is my current `post-receive` hook, and it works quite well, I think. + +Anyway. Things are working, jankily yet so. + +Next: I am praying that I find some time/ brainpower to fix up the CSS on this website. The misaligned sidenotes are quite irritating. + ## Mind @mind {#mind} diff --git a/content/blog/a-kind-view-of-business.md b/content/blog/a-kind-view-of-business.md index c2afdb2..518e80d 100644 --- a/content/blog/a-kind-view-of-business.md +++ b/content/blog/a-kind-view-of-business.md @@ -1,7 +1,7 @@ +++ title = "A kind view of business" publishDate = 2024-01-25T00:00:00+01:00 -lastmod = 2024-11-18T20:00:51+01:00 +lastmod = 2024-11-18T20:09:30+01:00 tags = ["mindset", "rant"] categories = ["business"] draft = false diff --git a/content/blog/a-new-look.md b/content/blog/a-new-look.md index e635cd7..a44c6fa 100644 --- a/content/blog/a-new-look.md +++ b/content/blog/a-new-look.md @@ -1,7 +1,7 @@ +++ title = "A new look: ox-tufte" publishDate = 2023-10-23T00:00:00+02:00 -lastmod = 2024-11-18T20:00:51+01:00 +lastmod = 2024-11-18T20:09:29+01:00 tags = ["orgmode", "web", "css", "tufte"] categories = ["emacs", "tech"] draft = false diff --git a/content/blog/avoidance-in-business.md b/content/blog/avoidance-in-business.md index f88e938..9f148c5 100644 --- a/content/blog/avoidance-in-business.md +++ b/content/blog/avoidance-in-business.md @@ -1,7 +1,7 @@ +++ title = "On Avoidance in Business" publishDate = 2023-05-04T00:00:00+02:00 -lastmod = 2024-11-18T20:00:51+01:00 +lastmod = 2024-11-18T20:09:30+01:00 tags = ["psychology", "riskmanagement", "avoidance", "fear"] categories = ["business"] draft = false diff --git a/content/blog/brain-lube-2.md b/content/blog/brain-lube-2.md index be75757..41fd416 100644 --- a/content/blog/brain-lube-2.md +++ b/content/blog/brain-lube-2.md @@ -1,7 +1,7 @@ +++ title = "Trying out some brain supplements, pt. 2" publishDate = 2022-11-20T00:00:00+01:00 -lastmod = 2024-11-18T20:00:51+01:00 +lastmod = 2024-11-18T20:09:29+01:00 tags = ["supplements", "nootropics"] categories = ["mind"] draft = false diff --git a/content/blog/brain-lube-3.md b/content/blog/brain-lube-3.md index f9cdd2d..65a6d25 100644 --- a/content/blog/brain-lube-3.md +++ b/content/blog/brain-lube-3.md @@ -1,7 +1,7 @@ +++ title = "Brain supplements: A two month summary" publishDate = 2023-01-06T00:00:00+01:00 -lastmod = 2024-11-18T20:00:51+01:00 +lastmod = 2024-11-18T20:09:29+01:00 tags = ["supplements", "nootropics"] categories = ["mind"] draft = false diff --git a/content/blog/brain-lube.md b/content/blog/brain-lube.md index 064c65c..16d24d8 100644 --- a/content/blog/brain-lube.md +++ b/content/blog/brain-lube.md @@ -1,7 +1,7 @@ +++ title = "Trying out some brain supplements" publishDate = 2022-11-18T00:00:00+01:00 -lastmod = 2024-11-18T20:00:51+01:00 +lastmod = 2024-11-18T20:09:29+01:00 tags = ["supplements", "nootropics"] categories = ["mind"] draft = false diff --git a/content/blog/call-it-a-day.md b/content/blog/call-it-a-day.md index a185d90..c4d0445 100644 --- a/content/blog/call-it-a-day.md +++ b/content/blog/call-it-a-day.md @@ -1,7 +1,7 @@ +++ title = "On the value of calling it a day (and how to get there)" publishDate = 2022-09-30T00:00:00+02:00 -lastmod = 2024-11-18T20:00:51+01:00 +lastmod = 2024-11-18T20:09:30+01:00 tags = ["psychology", "work", "projectmanagement"] categories = ["business"] draft = false diff --git a/content/blog/efficiency-typing.md b/content/blog/efficiency-typing.md index b0e9838..e719c2c 100644 --- a/content/blog/efficiency-typing.md +++ b/content/blog/efficiency-typing.md @@ -1,7 +1,7 @@ +++ title = "Efficient computer use" publishDate = 2022-11-12T00:00:00+01:00 -lastmod = 2024-11-18T20:00:51+01:00 +lastmod = 2024-11-18T20:09:29+01:00 tags = ["ergonomics", "keyboards", "typing", "speed", "efficency"] categories = ["tech"] draft = false diff --git a/content/blog/foss-subscription-model.md b/content/blog/foss-subscription-model.md index 4f08c01..871ba88 100644 --- a/content/blog/foss-subscription-model.md +++ b/content/blog/foss-subscription-model.md @@ -1,7 +1,7 @@ +++ title = "Considerations on FOSS and subscription models" publishDate = 2022-10-02T00:00:00+02:00 -lastmod = 2024-11-18T20:00:51+01:00 +lastmod = 2024-11-18T20:09:29+01:00 tags = ["business", "foss", "vendorlock", "proprietary", "saas", "scam"] categories = ["tech"] draft = false diff --git a/content/blog/games-yakuza.md b/content/blog/games-yakuza.md index 50163b6..98bd261 100644 --- a/content/blog/games-yakuza.md +++ b/content/blog/games-yakuza.md @@ -1,7 +1,7 @@ +++ title = "Heaps of fun (Yakuza)" publishDate = 2022-10-17T00:00:00+02:00 -lastmod = 2024-11-18T20:00:51+01:00 +lastmod = 2024-11-18T20:09:30+01:00 tags = ["yakuza", "review"] categories = ["videogames"] draft = false diff --git a/content/blog/haxe-vscode.md b/content/blog/haxe-vscode.md index ef4516c..6bca14a 100644 --- a/content/blog/haxe-vscode.md +++ b/content/blog/haxe-vscode.md @@ -1,7 +1,7 @@ +++ title = "Haxe, heaps, and VSCode (small rant)" publishDate = 2022-10-10T00:00:00+02:00 -lastmod = 2024-11-18T20:00:50+01:00 +lastmod = 2024-11-18T20:09:29+01:00 tags = ["proprietary", "vscode", "vendorlock"] categories = ["software", "tech"] draft = false diff --git a/content/blog/lists-self-promotion.md b/content/blog/lists-self-promotion.md index ed17abf..3c91fc4 100644 --- a/content/blog/lists-self-promotion.md +++ b/content/blog/lists-self-promotion.md @@ -1,7 +1,7 @@ +++ title = "[Happy Holidays!] On posting lists for self-promotion" publishDate = 2022-12-25T00:00:00+01:00 -lastmod = 2024-11-18T20:00:51+01:00 +lastmod = 2024-11-18T20:09:30+01:00 tags = ["badmarketing", "linkedin"] categories = ["business"] draft = false diff --git a/content/blog/mastering-emacs.md b/content/blog/mastering-emacs.md index ea94c80..7c54174 100644 --- a/content/blog/mastering-emacs.md +++ b/content/blog/mastering-emacs.md @@ -1,7 +1,7 @@ +++ title = "Weekend thoughts - Mastering Emacs by Mickey Petersen" publishDate = 2022-10-08T00:00:00+02:00 -lastmod = 2024-11-18T20:00:51+01:00 +lastmod = 2024-11-18T20:09:30+01:00 tags = ["emacs", "review"] categories = ["books"] draft = false diff --git a/content/blog/misskey-resetting-admin-password.md b/content/blog/misskey-resetting-admin-password.md index 35c5aa5..c7c12f2 100644 --- a/content/blog/misskey-resetting-admin-password.md +++ b/content/blog/misskey-resetting-admin-password.md @@ -1,7 +1,7 @@ +++ title = "MissKey: Resetting Admin Password" publishDate = 2023-08-11T00:00:00+02:00 -lastmod = 2024-11-18T20:00:50+01:00 +lastmod = 2024-11-18T20:09:29+01:00 tags = ["misskey", "admin", "postgres"] categories = ["tech"] draft = false diff --git a/content/blog/moving-to-hugo.md b/content/blog/moving-to-hugo.md index 03abeb0..7c99388 100644 --- a/content/blog/moving-to-hugo.md +++ b/content/blog/moving-to-hugo.md @@ -1,6 +1,6 @@ +++ title = "Moving to Hugo" -lastmod = 2024-11-18T20:00:51+01:00 +lastmod = 2024-11-18T20:09:29+01:00 tags = ["hugo", "web", "orgmode", "css", "tufte"] categories = ["tech", "emacs"] draft = false diff --git a/content/blog/my-favorite-factorio-mods.md b/content/blog/my-favorite-factorio-mods.md index 7a0ad7e..206c69a 100644 --- a/content/blog/my-favorite-factorio-mods.md +++ b/content/blog/my-favorite-factorio-mods.md @@ -1,7 +1,7 @@ +++ title = "My favorite Factorio mods" publishDate = 2023-07-24T00:00:00+02:00 -lastmod = 2024-11-18T20:00:51+01:00 +lastmod = 2024-11-18T20:09:30+01:00 tags = ["factorio", "mods"] categories = ["videogames"] draft = false diff --git a/content/blog/new-keyboard-layout-colemak-dh.md b/content/blog/new-keyboard-layout-colemak-dh.md index a6a4348..3aa043a 100644 --- a/content/blog/new-keyboard-layout-colemak-dh.md +++ b/content/blog/new-keyboard-layout-colemak-dh.md @@ -1,7 +1,7 @@ +++ title = "Learning a new keyboard layout" publishDate = 2022-08-18T00:00:00+02:00 -lastmod = 2024-11-18T20:00:51+01:00 +lastmod = 2024-11-18T20:09:30+01:00 tags = ["ergonomics", "keyboard", "colemak", "typing"] categories = ["body"] draft = false diff --git a/content/blog/on-problems.md b/content/blog/on-problems.md index c1dd071..60fdcd2 100644 --- a/content/blog/on-problems.md +++ b/content/blog/on-problems.md @@ -1,7 +1,7 @@ +++ title = "On Problems" publishDate = 2022-11-21T00:00:00+01:00 -lastmod = 2024-11-18T20:00:51+01:00 +lastmod = 2024-11-18T20:09:29+01:00 tags = ["psychology", "problems"] categories = ["mind"] draft = false diff --git a/content/blog/overcoming-rsi.md b/content/blog/overcoming-rsi.md index 674eed6..105cef5 100644 --- a/content/blog/overcoming-rsi.md +++ b/content/blog/overcoming-rsi.md @@ -1,7 +1,7 @@ +++ title = "Overcoming typing-related RSI" publishDate = 2022-09-22T00:00:00+02:00 -lastmod = 2024-11-18T20:00:51+01:00 +lastmod = 2024-11-18T20:09:30+01:00 tags = ["ergonomics", "keyboard", "typing", "rsi", "health"] categories = ["body"] draft = false diff --git a/content/blog/realistic-deadlines.md b/content/blog/realistic-deadlines.md index 393f079..d0118fe 100644 --- a/content/blog/realistic-deadlines.md +++ b/content/blog/realistic-deadlines.md @@ -1,7 +1,7 @@ +++ title = "Realistic deadlines" publishDate = 2022-09-30T00:00:00+02:00 -lastmod = 2024-11-18T20:00:51+01:00 +lastmod = 2024-11-18T20:09:30+01:00 tags = ["projectmanagement", "work"] categories = ["business"] draft = false diff --git a/content/blog/saas-business-foss.md b/content/blog/saas-business-foss.md index f24e19b..032ead0 100644 --- a/content/blog/saas-business-foss.md +++ b/content/blog/saas-business-foss.md @@ -1,7 +1,7 @@ +++ title = "Some thoughts on SaaS and business applications of Free Software" publishDate = 2022-09-28T00:00:00+02:00 -lastmod = 2024-11-18T20:00:51+01:00 +lastmod = 2024-11-18T20:09:30+01:00 tags = ["saas", "scam", "vendorlock", "interoperability"] categories = ["business"] draft = false diff --git a/content/blog/shared-hosting-scam.md b/content/blog/shared-hosting-scam.md index 245a457..dd0b9b6 100644 --- a/content/blog/shared-hosting-scam.md +++ b/content/blog/shared-hosting-scam.md @@ -1,7 +1,7 @@ +++ title = "Shared hosting is a scam" publishDate = 2023-03-29T00:00:00+02:00 -lastmod = 2024-11-18T20:00:50+01:00 +lastmod = 2024-11-18T20:09:29+01:00 tags = ["sharedhosting", "saas", "scam"] categories = ["tech"] draft = false diff --git a/content/blog/shiny-objects-and-learning.md b/content/blog/shiny-objects-and-learning.md index e7db8dc..fa1b6a6 100644 --- a/content/blog/shiny-objects-and-learning.md +++ b/content/blog/shiny-objects-and-learning.md @@ -1,7 +1,7 @@ +++ title = "Shiny objects, and learning" publishDate = 2024-04-24T00:00:00+02:00 -lastmod = 2024-11-18T20:00:51+01:00 +lastmod = 2024-11-18T20:09:30+01:00 tags = ["mindset", "attitude", "rant"] categories = ["business"] draft = false diff --git a/content/blog/vps-is-my-new-friend.md b/content/blog/vps-is-my-new-friend.md index 75a5b4d..1ffe7eb 100644 --- a/content/blog/vps-is-my-new-friend.md +++ b/content/blog/vps-is-my-new-friend.md @@ -1,7 +1,7 @@ +++ title = "VPS is my new friend" publishDate = 2022-10-07T00:00:00+02:00 -lastmod = 2024-11-18T20:00:50+01:00 +lastmod = 2024-11-18T20:09:29+01:00 tags = ["vps", "sysadmin", "servers", "ssh", "sshfs", "foss", "vendorlock"] categories = ["tech"] draft = false diff --git a/content/blog/vps-setup.md b/content/blog/vps-setup.md index 3ffb6ac..f3f52f8 100644 --- a/content/blog/vps-setup.md +++ b/content/blog/vps-setup.md @@ -1,7 +1,7 @@ +++ title = "VPS set-up" publishDate = 2022-08-18T00:00:00+02:00 -lastmod = 2024-11-18T20:00:51+01:00 +lastmod = 2024-11-18T20:09:29+01:00 tags = ["vps", "sysadmin", "servers"] categories = ["tech"] draft = false diff --git a/content/blog/wisdom-from-a-satyr.md b/content/blog/wisdom-from-a-satyr.md index 9dd3c54..999e443 100644 --- a/content/blog/wisdom-from-a-satyr.md +++ b/content/blog/wisdom-from-a-satyr.md @@ -1,7 +1,7 @@ +++ title = "Wisdom from a Satyr" publishDate = 2023-03-30T00:00:00+02:00 -lastmod = 2024-11-18T20:00:51+01:00 +lastmod = 2024-11-18T20:09:29+01:00 tags = ["ethics", "suffering", "buddhism"] categories = ["wisdom", "mind"] draft = false diff --git a/content/blog/words-in-a-moment-of-peace.md b/content/blog/words-in-a-moment-of-peace.md index 2ba594d..1239400 100644 --- a/content/blog/words-in-a-moment-of-peace.md +++ b/content/blog/words-in-a-moment-of-peace.md @@ -1,7 +1,7 @@ +++ title = "Some words in a moment of peace" publishDate = 2023-04-04T00:00:00+02:00 -lastmod = 2024-11-18T20:00:51+01:00 +lastmod = 2024-11-18T20:09:29+01:00 tags = ["language", "words", "meaning", "clarity", "communication"] categories = ["mind"] draft = false diff --git a/content/blog/zucc-may-be-lying.md b/content/blog/zucc-may-be-lying.md index 39eb083..153ef2e 100644 --- a/content/blog/zucc-may-be-lying.md +++ b/content/blog/zucc-may-be-lying.md @@ -1,6 +1,6 @@ +++ title = "On Mark Zuckerberg's recent claims" -lastmod = 2024-11-18T20:00:50+01:00 +lastmod = 2024-11-18T20:09:29+01:00 tags = ["copyright", "zuckerberg"] categories = ["tech", "llm"] draft = false diff --git a/content/contact/index.md b/content/contact/index.md index 9a9e34f..6f6fe73 100644 --- a/content/contact/index.md +++ b/content/contact/index.md @@ -1,7 +1,7 @@ +++ title = "Contact" publishDate = 2023-06-20T00:35:00+02:00 -lastmod = 2024-11-18T20:00:50+01:00 +lastmod = 2024-11-18T20:09:29+01:00 draft = false hidefromhome = true meta = false