Gemini: Reduce content

Adds task for reducing built data down to what's needed for gemini.
This commit is contained in:
JP Hastings-Spital 2024-04-30 13:27:07 +01:00
parent d949c229cb
commit d05973b8a3
7 changed files with 29 additions and 1 deletions

View file

@ -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

View file

@ -2,6 +2,8 @@
title: Oops!
emoji: 😰
type: site-infra
outputs:
- html
_build:
list: never
---

View file

@ -2,6 +2,8 @@
title: Thank you!
emoji: 🙇‍♂️
type: site-infra
outputs:
- html
_build:
list: never
---

View file

@ -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

View file

@ -0,0 +1,3 @@
---
title: IPFS
---

View file

@ -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.
---

View file

@ -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.
---