From d05973b8a30b2a2efed0dd5107f41ee58748cfc0 Mon Sep 17 00:00:00 2001 From: JP Hastings-Spital Date: Tue, 30 Apr 2024 13:27:07 +0100 Subject: [PATCH] Gemini: Reduce content Adds task for reducing built data down to what's needed for gemini. --- Taskfile.yml | 18 +++++++++++++++++- content/donation-error.md | 2 ++ content/donation-registered.md | 2 ++ content/reading-lists/_index.md | 1 + content/tags/ipfs/_index.md | 3 +++ content/thanks.md | 2 ++ content/twitter.md | 2 ++ 7 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 content/tags/ipfs/_index.md diff --git a/Taskfile.yml b/Taskfile.yml index 09471b72..5ade922a 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -44,8 +44,24 @@ tasks: - go run ./import/omnivore ../ - go run ./import/webmentionio - gemini: + gemini-reduce: + desc: Builds the gemini capsule, removing all HTML and HTML-specific files from ./public. + silent: true + cmds: + # Gemini has no Javascript (no client-side interactivity at all), so search is useless + - rm -rf ./public/search + # Remove www-specific files + - find -E ./public -regex '.*\.(html|js|css|css\.map|webmanifest|xml|xsl|ico|opml)' -type f -delete + # Remove specific unneeded files + - rm -rf ./public/favicon*.png ./public/_redirects ./public/{apple,android,mstile}*.png ./public/safari-pinned-tab.svg ./public/robots.txt + # Remove specific unneeded direcctories + - rm -rf ./public/.well-known/ ./public/fonts/ ./public/standalone/project-prime/ + # Remove empty directories + - find ./public -type d -empty -delete + + gemini-dev: desc: Builds the site & starts a gemini server (on the default port) for it. deps: [ build ] cmds: - agate --content public --lang en-GB --hostname "{{ .domain }}{{ .puma_dev_tld }}" --central-conf + diff --git a/content/donation-error.md b/content/donation-error.md index 33ab2804..3b288219 100644 --- a/content/donation-error.md +++ b/content/donation-error.md @@ -2,6 +2,8 @@ title: Oops! emoji: 😰 type: site-infra +outputs: +- html _build: list: never --- diff --git a/content/donation-registered.md b/content/donation-registered.md index 10a94ee8..ab984d96 100644 --- a/content/donation-registered.md +++ b/content/donation-registered.md @@ -2,6 +2,8 @@ title: Thank you! emoji: 🙇‍♂️ type: site-infra +outputs: +- html _build: list: never --- diff --git a/content/reading-lists/_index.md b/content/reading-lists/_index.md index a2f24d0f..fd0fb7c8 100644 --- a/content/reading-lists/_index.md +++ b/content/reading-lists/_index.md @@ -5,6 +5,7 @@ date: 2023-10-24 08:08:08 BST summary: The collection of RSS feeds I subscribe to, parcelled up so you can subscribe easily too. outputs: - html +- gemini - opml sitemap: changefreq: monthly diff --git a/content/tags/ipfs/_index.md b/content/tags/ipfs/_index.md new file mode 100644 index 00000000..4480c6bc --- /dev/null +++ b/content/tags/ipfs/_index.md @@ -0,0 +1,3 @@ +--- +title: IPFS +--- diff --git a/content/thanks.md b/content/thanks.md index ad4f347a..ddf90b4b 100644 --- a/content/thanks.md +++ b/content/thanks.md @@ -2,6 +2,8 @@ title: Saying thank you type: timeless emoji: 💞 +outputs: +- html summary: A way to thank me, if you like anything on this site to do so. --- diff --git a/content/twitter.md b/content/twitter.md index 7b9e95c7..1a27db4f 100644 --- a/content/twitter.md +++ b/content/twitter.md @@ -3,6 +3,8 @@ title: "Bye bye Twitter" emoji: 💀 date: 2024-03-27T19:43:01.595Z type: timeless +outputs: +- html summary: I link here instead of linking to Twitter now. ---