So after writing he previous post on this matter I came to two conclsions
- This website, and this induvidual project, requires its own build log - This was changed. The commit hashes are listed below
site commit: 1503286ff0b39d3f502a70373e803ec0b381940d
sigs commit: 507310741ac6370d93f8b2e72f343456c81f7de1
- I am overcomplicating this
Hugo, unsuprisingly, has a features within it which solve every issue which I am trying to fix myself.
Custom Output Formats
- From digging around stack overflow and several carefully worded messages to our favourite dimwitted genius (chat gpt) i came across this page. If you read the page at some point you will encouter a string stating
“A page can be output in as many output formats as your want, and you can have an infinate amount of output formats desfined as long as they resolve a unique path on the file system”
This essentially does what I planned to do with my previous plan. The old plan was to have an entire sperate directory inside the content folder, which contained the signed posts and instructions in the front matter to use a different theme. This essentially doees the same but in a tidier way.
To do this i basically need to edit my hugo.toml file with the [outputFormats] section. I need to define two formats, one which uses my current theme and one which outputs it in plain text (which there is a option for). It will look something like this
[outputFormats]
[outputFormats.standardFormat]
name = "standard-format"
baseName = "index"
isPlainText = false
mediaType = "text/html"
path = ""
permalinkable = true
weight = 1
[outputFormats.sigFormat]
name = "sig-format"
baseName = "sig"
isPlainText = true
mediaType = "text/html"
path = "sigs"
permalinkable = true
weight = 2
To take advantage of these two outputs I will need to call to these in the post-front matter. An example of this is shown below
- ---
title: 'test-page'
date: 2023-11-11T12:09:10Z
draft: false
outputs:
- standard-format
- sig-format
- ---
- -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
this is a message signed by me - eddiequinn
-
Verify this post
This page is published as a PGP clearsigned document. You can verify it like this:
gpg --keyserver hkps://keys.openpgp.org --recv-keys CA98D5946FA3A374BA7E2D8FB254FBF3F060B796
curl -fsSL 'https://eddiequinn.xyz/sigs/build-logs/eddiequinn.xyz/signing-posts/new-plan.txt' | gpg --verify