From 66f8cf1afc88be6cd7334297241adcad4bb95099 Mon Sep 17 00:00:00 2001 From: Dominic Ricottone Date: Sat, 11 Nov 2023 21:18:30 +0000 Subject: [PATCH] Reorganization Added URL aliases for published posts. Updated configuration for permalinks. --- Makefile | 29 ++++------ config.toml | 3 ++ content/posts/acs_data.md | 2 + content/posts/buildkit.md | 2 + content/posts/busy_winter.md | 2 + content/posts/cleaning_up.md | 54 +++++++++++++++++++ .../disruption_from_google_and_red_hat.md | 2 + content/posts/docker.md | 2 + content/posts/fedora_38.md | 2 + content/posts/first_x86_server.md | 2 + content/posts/html_and_xml.md | 2 + content/posts/i_moved.md | 2 + content/posts/identity.md | 2 + .../posts/logging_and_rate_limiting_take_2.md | 2 + content/posts/playing_with_web_services.md | 2 + .../posts/progress_and_the_lack_thereof.md | 2 + content/posts/rate_limiting.md | 2 + content/posts/return_to_selfhosted_form.md | 2 + content/posts/setting_up_hugo.md | 2 + content/posts/systems_updates.md | 2 + ...thoughts_on_the_organization_of_history.md | 2 + content/posts/vacation_2023.md | 2 + content/posts/wireguard.md | 2 + 23 files changed, 108 insertions(+), 18 deletions(-) create mode 100644 content/posts/cleaning_up.md diff --git a/Makefile b/Makefile index 75e9c5b..71b8c3a 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,10 @@ -TARGET_USER=admin -TARGET_HOST=admin-aws3 -RSYNC_OPTS=--recursive --links --compress --delete --chown=$(TARGET_USER):$(TARGET_USER) - -.PHONY: clean clean: rm -rf public resources themes rm -rf scripts/cv.aux scripts/cv.log scripts/cv.out rm -rf content/posts/*.bak + rm -rf layouts/partials/bsky.html + rm -rf layouts/partials/lastfm.html + rm -rf layouts/partials/openring.html scripts/cv.tex: content/cv.md sed content/cv.md \ @@ -24,33 +22,28 @@ static/files/dominic-ricottone.html: content/cv.md cat content/cv.md \ | scripts/cv_html.awk > static/files/dominic-ricottone.html -.PHONY: layouts/partials/bsky.html layouts/partials/bsky.html: scripts/bsky.bash > layouts/partials/bsky.html -.PHONY: layouts/partials/lastfm.html layouts/partials/lastfm.html: scripts/lastfm.sh > layouts/partials/lastfm.html -.PHONY: layouts/partials/openring.html layouts/partials/openring.html: scripts/openring.sh > layouts/partials/openring.html PREGEN_HTML=static/files/dominic-ricottone.pdf static/files/dominic-ricottone.html layouts/partials/bsky.html layouts/partials/lastfm.html layouts/partials/openring.html -.PHONY: dev -dev: $(PREGEN_HTML) - hugo server --buildDrafts --bind 127.0.0.1 --port 8080 - -.PHONY: build -build: clean $(PREGEN_HTML) +build: $(PREGEN_HTML) clean hugo -.PHONY: check check: for f in content/posts/*.md; do aspell --check $$f; done -.PHONY: sync -sync: build - rsync $(RSYNC_OPTS) public/ $(TARGET_HOST):/var/deploy/build/blog/public/ +dev: $(PREGEN_HTML) + hugo --buildDrafts --baseURL https://dev.intra.dominic-ricottone.com + rsync --recursive --links --compress --delete public/ alarm@arch3.intra.dominic-ricottone.com:/var/deploy/web/ + +publish: build + rsync --recursive --links --compress --delete --chown=admin:admin public/ admin-aws3:/var/deploy/build/blog/public/ +.PHONY: clean build check dev publish diff --git a/config.toml b/config.toml index 9df118a..116c46d 100644 --- a/config.toml +++ b/config.toml @@ -4,6 +4,9 @@ title = "Dominic Ricottone" disableKinds = ["taxonomy", "taxonomyTerm"] summaryLength = 20 +[permalinks] +posts = "/posts/:year/:month/:slug" + [markup.goldmark.renderer] unsafe=true diff --git a/content/posts/acs_data.md b/content/posts/acs_data.md index 9010d07..4a70b5c 100644 --- a/content/posts/acs_data.md +++ b/content/posts/acs_data.md @@ -1,6 +1,8 @@ --- title: ACS Data date: "2023-03-21T20:34:24-05:00" +aliases: + - "/posts/acs_data" draft: false --- diff --git a/content/posts/buildkit.md b/content/posts/buildkit.md index 72a18b5..f194743 100644 --- a/content/posts/buildkit.md +++ b/content/posts/buildkit.md @@ -1,6 +1,8 @@ --- title: BuildKit date: "2023-05-29T21:29:33-05:00" +aliases: + - "/posts/buildkit" draft: false --- diff --git a/content/posts/busy_winter.md b/content/posts/busy_winter.md index 67feb91..f9cebf2 100644 --- a/content/posts/busy_winter.md +++ b/content/posts/busy_winter.md @@ -1,6 +1,8 @@ --- title: Busy Winter date: "2022-12-27T21:06:51-06:00" +aliases: + - "/posts/busy_winter" draft: false --- diff --git a/content/posts/cleaning_up.md b/content/posts/cleaning_up.md new file mode 100644 index 0000000..ff96926 --- /dev/null +++ b/content/posts/cleaning_up.md @@ -0,0 +1,54 @@ +--- +title: Cleaning Up +date: "2023-11-11T20:22:52+00:00" +draft: true +--- + +I've restructured the way permalinks are generated. +While I do prefer underscores for file names, +URLS are decidedly cleaner when using dashes. +Luckily Hugo already has a concept for this (`:slug`) so it's as simple as +setting the permalink template with that 'variable'. + +To prevent breakage of existing links, I've set up aliases. +That's another very convenient feature of Hugo. +I've also seens some recipes online for creating aliases automatically. +I'm not currently sold on the idea of setting up named aliases for all posts +going forward, +but I'll revisit that in the new year. + +And since I'm doing all of that, I decided it's also time to organize +permalinks based on publication date. + +---- + +I've significantly reworked my development workflow in the last couple months. +It's become a headache to try and keep all of my internal toolchains, +script interpretters, and document processors up-to-date across all of the +hosts I use. +For a long time, I liked to think that I sidestepped this issue by using POSIX +scripts. +But *apparently several distros feel otherwise*. + +It's not even Red Hat that I'm specifically frustrated at right now. +It's come to my attention that `ed` isn't installed by default on Ubuntu. +Now I know, few people care about `ed`, I'm in an extreme minority. +It's still POSIX. + +So I've centralized all of those installations to a single host +*(on public internet, +but without any compromisable servers running, +and requiring an SSH key for login)*, +and it `rsync`s built files to a separate web server only accessible on my +VLAN. + +Anyway, that's prompted a gradual revisiting of all of my `Makefile`s. +It's sometimes interesting to see how my approach to those has changed over +time. +Clearly 4 years ago I was obsessed with parameterizing them. +I think my current attitude is to keep them file-oriented, and anything more +complicated is pulled out into a separate script. +Many of my projects now feature a top-level `scripts` folder. +*(This is also why keeping my script interpreters up-to-date was such a +hastle.)* + diff --git a/content/posts/disruption_from_google_and_red_hat.md b/content/posts/disruption_from_google_and_red_hat.md index 1504d00..a550531 100644 --- a/content/posts/disruption_from_google_and_red_hat.md +++ b/content/posts/disruption_from_google_and_red_hat.md @@ -1,6 +1,8 @@ --- title: Disruption from Google and Red Hat date: "2023-06-27T14:59:08-05:00" +aliases: + - "/posts/disruption_from_google_and_red_hat" draft: false --- diff --git a/content/posts/docker.md b/content/posts/docker.md index cb20508..5b12821 100644 --- a/content/posts/docker.md +++ b/content/posts/docker.md @@ -1,6 +1,8 @@ --- title: "Docker" date: 2020-07-10T17:12:12-04:00 +aliases: + - "/posts/docker" draft: false --- diff --git a/content/posts/fedora_38.md b/content/posts/fedora_38.md index 5ea58c3..bbb3757 100644 --- a/content/posts/fedora_38.md +++ b/content/posts/fedora_38.md @@ -1,6 +1,8 @@ --- title: "Fedora 38" date: "2023-04-19T21:59:07-05:00" +aliases: + - "/posts/fedora_38" draft: false --- diff --git a/content/posts/first_x86_server.md b/content/posts/first_x86_server.md index df172ff..dcb67fd 100644 --- a/content/posts/first_x86_server.md +++ b/content/posts/first_x86_server.md @@ -1,6 +1,8 @@ --- title: First x86 Server date: "2023-07-27T12:20:19-05:00" +aliases: + - "/posts/first_x86_server" draft: false --- diff --git a/content/posts/html_and_xml.md b/content/posts/html_and_xml.md index 340ac8f..3b915bb 100644 --- a/content/posts/html_and_xml.md +++ b/content/posts/html_and_xml.md @@ -1,6 +1,8 @@ --- title: HTML and XML date: "2022-10-27T11:08:41-05:00" +aliases: + - "/posts/html_and_xml" draft: false --- diff --git a/content/posts/i_moved.md b/content/posts/i_moved.md index f3ce418..8a21afe 100644 --- a/content/posts/i_moved.md +++ b/content/posts/i_moved.md @@ -1,6 +1,8 @@ --- title: "I Moved" date: 2021-11-11T22:56:46-06:00 +aliases: + - "/posts/i_moved" draft: false --- diff --git a/content/posts/identity.md b/content/posts/identity.md index b386bf0..f509543 100644 --- a/content/posts/identity.md +++ b/content/posts/identity.md @@ -1,6 +1,8 @@ --- title: Identity date: 2022-10-06T10:13:32-05:00 +aliases: + - "/posts/identity" draft: false --- diff --git a/content/posts/logging_and_rate_limiting_take_2.md b/content/posts/logging_and_rate_limiting_take_2.md index b3f3de0..fd8cf36 100644 --- a/content/posts/logging_and_rate_limiting_take_2.md +++ b/content/posts/logging_and_rate_limiting_take_2.md @@ -1,6 +1,8 @@ --- title: Logging and Rate Limiting, Take 2 date: "2023-08-08T12:12:32-05:00" +aliases: + - "/posts/logging_and_rate_limiting_take_2" draft: false --- diff --git a/content/posts/playing_with_web_services.md b/content/posts/playing_with_web_services.md index 6056704..3f8ec11 100644 --- a/content/posts/playing_with_web_services.md +++ b/content/posts/playing_with_web_services.md @@ -1,6 +1,8 @@ --- title: "Playing with Web Services" date: 2020-04-15T12:24:13-04:00 +aliases: + - "/posts/playing-with-web-services" draft: false --- diff --git a/content/posts/progress_and_the_lack_thereof.md b/content/posts/progress_and_the_lack_thereof.md index cd53302..ba97ba4 100644 --- a/content/posts/progress_and_the_lack_thereof.md +++ b/content/posts/progress_and_the_lack_thereof.md @@ -1,6 +1,8 @@ --- title: "Progress and the lack thereof" date: 2022-09-18T17:44:00-05:00 +aliases: + - "/posts/progress_and_the_lack_thereof" draft: false --- diff --git a/content/posts/rate_limiting.md b/content/posts/rate_limiting.md index 4fda330..04ed765 100644 --- a/content/posts/rate_limiting.md +++ b/content/posts/rate_limiting.md @@ -1,6 +1,8 @@ --- title: Rate Limiting date: "2023-03-29T23:55:56-05:00" +aliases: + - "/posts/rate_limiting" draft: false --- diff --git a/content/posts/return_to_selfhosted_form.md b/content/posts/return_to_selfhosted_form.md index 237c5cd..4627f2a 100644 --- a/content/posts/return_to_selfhosted_form.md +++ b/content/posts/return_to_selfhosted_form.md @@ -1,6 +1,8 @@ --- title: "Return to self-hosted form" date: 2022-09-14T15:56:55-05:00 +aliases: + - "/posts/return_to_selfhosted_form" draft: false --- diff --git a/content/posts/setting_up_hugo.md b/content/posts/setting_up_hugo.md index 2f5b99b..e401de0 100644 --- a/content/posts/setting_up_hugo.md +++ b/content/posts/setting_up_hugo.md @@ -1,6 +1,8 @@ --- title: "Setting up Hugo" date: 2020-01-24T19:32:43-05:00 +aliases: + - "/posts/setting-up-hugo" draft: false --- diff --git a/content/posts/systems_updates.md b/content/posts/systems_updates.md index 7fbf253..f97dd52 100644 --- a/content/posts/systems_updates.md +++ b/content/posts/systems_updates.md @@ -1,6 +1,8 @@ --- title: Systems Updates date: "2022-11-12T18:32:12-06:00" +aliases: + - "/posts/systems_updates" draft: false --- diff --git a/content/posts/thoughts_on_the_organization_of_history.md b/content/posts/thoughts_on_the_organization_of_history.md index bc4342b..16643f2 100644 --- a/content/posts/thoughts_on_the_organization_of_history.md +++ b/content/posts/thoughts_on_the_organization_of_history.md @@ -1,6 +1,8 @@ --- title: Thoughts on the Organization of History date: "2023-05-19T11:30:26-05:00" +aliases: + - "/posts/thoughts_on_the_organization_of_history" draft: false --- diff --git a/content/posts/vacation_2023.md b/content/posts/vacation_2023.md index 51f60f6..f3a2694 100644 --- a/content/posts/vacation_2023.md +++ b/content/posts/vacation_2023.md @@ -1,6 +1,8 @@ --- title: Vacation 2023 date: "2023-04-26T09:35:51-05:00" +aliases: + - "/posts/vacation_2023" draft: false --- diff --git a/content/posts/wireguard.md b/content/posts/wireguard.md index f843515..60dfc02 100644 --- a/content/posts/wireguard.md +++ b/content/posts/wireguard.md @@ -1,6 +1,8 @@ --- title: "WireGuard" date: 2022-09-28T20:05:20-05:00 +aliases: + - "/posts/wireguard" draft: false --- -- 2.43.4