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/omnivore ../
- go run ./import/webmentionio - 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. desc: Builds the site & starts a gemini server (on the default port) for it.
deps: [ build ] deps: [ build ]
cmds: cmds:
- agate --content public --lang en-GB --hostname "{{ .domain }}{{ .puma_dev_tld }}" --central-conf - agate --content public --lang en-GB --hostname "{{ .domain }}{{ .puma_dev_tld }}" --central-conf

View file

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

View file

@ -2,6 +2,8 @@
title: Thank you! title: Thank you!
emoji: 🙇‍♂️ emoji: 🙇‍♂️
type: site-infra type: site-infra
outputs:
- html
_build: _build:
list: never 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. summary: The collection of RSS feeds I subscribe to, parcelled up so you can subscribe easily too.
outputs: outputs:
- html - html
- gemini
- opml - opml
sitemap: sitemap:
changefreq: monthly changefreq: monthly

View file

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

View file

@ -2,6 +2,8 @@
title: Saying thank you title: Saying thank you
type: timeless type: timeless
emoji: 💞 emoji: 💞
outputs:
- html
summary: A way to thank me, if you like anything on this site to do so. 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: 💀 emoji: 💀
date: 2024-03-27T19:43:01.595Z date: 2024-03-27T19:43:01.595Z
type: timeless type: timeless
outputs:
- html
summary: I link here instead of linking to Twitter now. summary: I link here instead of linking to Twitter now.
--- ---