Skip to content

Commit

Permalink
content(fix): review vale errors
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsneighbour committed Aug 7, 2023
1 parent 7340311 commit 220629d
Show file tree
Hide file tree
Showing 46 changed files with 236 additions and 296 deletions.
1 change: 1 addition & 0 deletions .github/vale/Vocab/dnb/accept.txt
@@ -1,3 +1,4 @@
davidsneighbour
David's Neighbour
(kK)ollitsch
VSCode
2 changes: 1 addition & 1 deletion .lintstagedrc.mjs
Expand Up @@ -23,7 +23,7 @@ export default {
"*.{scss,css}": "stylelint --fix",
"*.{png,jpeg,jpg,gif,svg}": "imagemin-lint-staged",
"*.{js,jsx}": "flow focus-check",
"!(CHANGELOG)**/*.{md,markdown}": ["vale"],
"!(CHANGELOG)**/*.{md,markdown}": ["npm run lint:vale"],
'**/*.ts?(x)': () => 'tsc -p tsconfig.json --noEmit',
//'**/*.js?(x)': (filenames) => filenames.map((filename) => `prettier --write '${filename}'`),
}
17 changes: 7 additions & 10 deletions content/blog/2021/earths-black-box/index.md
@@ -1,19 +1,16 @@
---
title: Earth's Black Box
description: It looks like earths climate catastrophe now has it's own black box which will record every step we take towards this catastrophe.

date: 2021-12-10T18:25:14+07:00
publishDate: 2021-12-10T18:25:14+07:00
lastmod: 2021-12-10T18:25:14+07:00

lastmod: 2023-08-07T19:29:46+07:00
resources:
- title: "Earth's Black Box by [earthsblackbox.com](https://www.earthsblackbox.com/)"
src: "earths-black-box.jpg"

- title: Earth's Black Box by [earthsblackbox.com](https://www.earthsblackbox.com/)
src: earths-black-box.jpg
tags:
- link
- earth
- logging
- link
- earth
- logging
---

It looks like earths climate catastrophe now has it's own black box.
Expand All @@ -26,6 +23,6 @@ The purpose of the device is to provide an unbiased account of the events that l

{{< /quote >}}

The building, four hours away from the next human settlement on the west coast of Tasmania in Australia, will be filled with harddrives that collect tweets, reports, news etc. about clima relevant topics. It also logs meterological and climate change relevant data like carbon dioxide levels, temperatures etc.
The building, four hours away from the next human settlement on the west coast of Tasmania in Australia, will be filled with harddrives that collect tweets, reports, news and so on about clima relevant topics. It also logs meterological and climate change relevant data like carbon dioxide levels, temperatures and so on.

The website already shows incoming log messages and the building is planned to be finished "early 2022". When it's finished the developers expect it to be able to collect 40 to 50 years of data.
8 changes: 4 additions & 4 deletions content/blog/2021/giscus-module-for-gohugo/index.md
@@ -1,20 +1,20 @@
---
title: Giscus Module for GoHugo
date: 2021-10-27T20:25:27+07:00
description: ''
description: ""
resources:
- src: gerry-roarty-slkENpP5PbI-unsplash.jpg
title: Photo by [Gerry Roarty](https://unsplash.com/@ger54321) via [Unsplash](https://unsplash.com)
tags:
- gohugo
- static websites
- giscus
lastmod: 2023-06-12T22:33:47+07:00
lastmod: 2023-08-07T19:33:03+07:00
---

[Giscus](https://github.com/giscus/giscus) is a new star on the comment systems for static website generators orbit. It is inspired by the wonderful [utterances](https://github.com/utterance/utterances) and uses Github Discussions to save comments. It's open source, easily configurable, themeable, translatable, and you can [host it on your own server](https://github.com/giscus/giscus/blob/main/SELF-HOSTING.md) (it's JavaScript based) if you like. I tried it, but ran into problems setting it up, so this will be a topic for a later post.

In my opinion this tool is very useful for development websites or smaller developer blogs (like this one) because the discussion can be continued over at Github or on the website, whatever you or your visitors prefer. And... aren't comments discussions? They finally arrived where they belong (at least in Github based websites and projects).
In my opinion this tool is very useful for development websites or smaller developer blogs (like this one) because the discussion can be continued over at Github or on the website, whatever you or your visitors prefer. And aren't comments discussions? They finally arrived where they belong (at least in Github based websites and projects).

You can see Giscus in action at the end of this post or any other post on this website. Feel free to test, but please try to add a useful comment :wink:

Expand Down Expand Up @@ -44,7 +44,7 @@ I created a [GoHugo](https://gohugo.io) module in [davidsneighbour/hugo-giscus](
4. Update your modules

```bash {lineAnchors=code3}
hugo mod get -u ./...
hugo mod get -u ./
```

5. Add the giscus-partial to your single.html or any post layout you are using in your theme:
Expand Down
27 changes: 13 additions & 14 deletions content/blog/2021/well-thats-a-unique-logo/index.md
@@ -1,9 +1,8 @@
---
title: Well... that's a unique... logo?
summary: I had a weird reaction (""well… that’s a unique logo?") to my really great
weblog logo above recently, so I thought I might as well explain it.
title: Well… that's a unique… logo?
summary: I had a weird reaction (""well… that’s a unique logo?") to my really great weblog logo above recently, so I thought I might as well explain it.
date: 2021-10-29T19:47:48+07:00
lastmod: 2022-04-17T18:01:41+07:00
lastmod: 2023-08-07T20:38:39+07:00
publishDate: 2021-10-29T19:47:48+07:00
resources:
- src: logo.png
Expand All @@ -14,17 +13,17 @@ tags:
- logos
---

I had a weird reaction ("well... that's a unique logo?") to my really great weblog logo above recently, so I thought I might as well explain it.
I had a weird reaction ("well that's a unique logo?") to my really great weblog logo above recently, so I thought I might as well explain it.

1. Star Trek tops Star Wars (don't even start discussing this)
2. I am a wizard (I have people on record saying that about me)
3. I am a dog person (cats suck, they want to take over the world and dominate us, wake up!)
4. I like to research things, dive into details, find out why things are how they are (and you might too)
5. I was born in Germany and lived there for a little bit over 29 years of my life
6. I now live and work on an island (for 16+ years)
7. ... in Thailand (we might go into depth about that in a later post)
8. I work with computers (obviously)
9. Issac Asimov rules!!!11One (if you need further information please refer to logo part 4)
1. Star Trek tops Star Wars (don't even start discussing this)
2. I am a wizard (I have people on record saying that about me)
3. I am a dog person (cats suck, they want to take over the world and dominate us, wake up!)
4. I like to research things, dive into details, find out why things are how they are (and you might too)
5. I was born in Germany and lived there for a little bit over 29 years of my life
6. I now live and work on an island (for 16+ years)
7. in Thailand (we might go into depth about that in a later post)
8. I work with computers (obviously)
9. Issac Asimov rules! (if you need further information please refer to logo part 4)
10. I create code
11. It's always a work in progress

Expand Down
9 changes: 5 additions & 4 deletions content/blog/2021/you-got-to/index.md
@@ -1,13 +1,14 @@
---
title: You got to...
date: '2021-11-15T21:45:44+07:00'
description: "... subscribe to Stefan Judis' Newsletter. Trust me. It's good. Weekly"
title: You got to
date: 2021-11-15T21:45:44+07:00
description: subscribe to Stefan Judis' Newsletter. Trust me. It's good. Weekly
resources:
- src: stefanjudis.com.jpg
title: stefanjudis.com
tags:
- newsletter
- web development
lastmod: 2023-08-07T19:33:03+07:00
---

... subscribe to [Stefan Judis' Newsletter](https://www.stefanjudis.com/) (click this link, load his site, scroll to the footer and subscribe). Trust me. It's good. Weekly. His topics touch everything web development related and there is never an issue from which I don't learn something new. Subscribe now and grow his subscriber list over 2k ;)
subscribe to [Stefan Judis' Newsletter](https://www.stefanjudis.com/) (click this link, load his site, scroll to the footer and subscribe). Trust me. It's good. Weekly. His topics touch everything web development related and there is never an issue from which I don't learn something new. Subscribe now and grow his subscriber list over 2k ;)
4 changes: 2 additions & 2 deletions content/blog/2022/100daystooffload/index.md
Expand Up @@ -4,7 +4,7 @@ linkTitle: "#100daystooffload"
slug: 100-days-to-offload
date: 2022-03-21T23:27:23+07:00
publishDate: 2022-03-21T23:27:23+07:00
lastmod: 2023-04-10T19:59:18+07:00
lastmod: 2023-08-07T20:24:49+07:00
resources:
- title: Photo by [Marcel Eberle](https://unsplash.com/@marcel_eberle) via [Unsplash](https://unsplash.com/)
src: marcel-eberle-SCBREPQuYoM-unsplash.jpg
Expand All @@ -27,7 +27,7 @@ I really think a better hashtag would have been #100PostsToOffload. But I have n
> * This needs to be done on a personal blog, not a corporate blog. If you don’t have a personal blog, you can sign up for a free one at Write.as.
> * There is no specific start date. Your 100 posts can start or end whenever you want them to.
> * Publish 100 new posts in the space of a year.
> * There are no limits to what you can post about write about whatever interests you.
> * There are no limits to what you can post about --- write about whatever interests you.
> * Once you have published an article, don’t forget to post a link on your social media with the hashtag #100DaysToOffload.
> * Get your friends involved!
Expand Down
16 changes: 4 additions & 12 deletions content/blog/2022/a-cat-and-a-dog/index.md
@@ -1,28 +1,20 @@
---
title: A Cat and a Dog
linkTitle: A Cat and a Dog
description: Ok, so this is a cat and a dog living peacefully together. I had to add this
just for some testing purposes ;) Keep calm and keep walking, there is nothing
to see here...

description: Ok, so this is a cat and a dog living peacefully together. I had to add this just for some testing purposes ;) Keep calm and keep walking, there is nothing to see here…
date: 2022-08-25T23:25:16+07:00
publishDate: 2022-08-25T23:25:16+07:00
lastmod: 2022-08-25T23:55:58+07:00

lastmod: 2023-08-07T19:33:03+07:00
resources:
- title: Photo by [Andrew S](https://unsplash.com/@sita2) via
[Unsplash](https://unsplash.com/)
- title: Photo by [Andrew S](https://unsplash.com/@sita2) via [Unsplash](https://unsplash.com/)
src: header.jpg

tags:
- cat
- dog
- 100DaysToOffload

type: blog

unsplash:
imageid: ouo1hbizWwo
---

Ok, so this is a cat and a dog living peacefully together. I had to add this just for some testing purposes ;) Keep calm and keep walking, there is nothing to see here (other than animals proving to us humans that one can live together with other kinds, but, well, whatever...)...
Ok, so this is a cat and a dog living peacefully together. I had to add this just for some testing purposes ;) Keep calm and keep walking, there is nothing to see here (other than animals proving to us humans that one can live together with other kinds, but, well, whatever…)…
4 changes: 2 additions & 2 deletions content/blog/2022/better-code-highlighting-in-hugo/index.md
Expand Up @@ -4,7 +4,7 @@ title: Better code highlighting for Hugo with render hooks
description: One of GoHugo's problems is, that the focus is mostly on speed. Simple HTML rules are prone to be ignored or freely interpreted (for instance, in the internal templates). But it offers ways to override and configure things, so not all is lost.
date: 2022-05-04T22:11:55+07:00
publishDate: 2022-05-04T22:11:55+07:00
lastmod: 2023-03-23T21:45:14+07:00
lastmod: 2023-08-07T19:29:59+07:00
resources:
- title: Photo by [Ussama Azam](https://unsplash.com/@ussamaazam) via [Unsplash](https://unsplash.com/)
src: header.jpg
Expand All @@ -17,7 +17,7 @@ tags:

One of GoHugo's problems is, that the focus is mostly on speed. Simple HTML rules are prone to be ignored or freely interpreted (for instance, in the [internal templates](https://github.com/gohugoio/hugo/tree/master/tpl/tplimpl/embedded/templates)). But it offers ways to override and configure things, so not all is lost.

Let's talk about the [highlight](https://gohugo.io/content-management/syntax-highlighting/)ing [shortcode](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/shortcodes/highlight.html) (or the default markup rendering for highlighting code). If you choose to display your highlighting section with line numbers that can be deep-linked, then you are in hot water, if you use two of these sections on a single page. The deeplinks are done via a counter system that is identical if both sections start with the line 1 (which they typically do) resulting in multiple id attributes of `#code-1`, `#code-2`, etc. for each first, second, etc. line.
Let's talk about the [highlight](https://gohugo.io/content-management/syntax-highlighting/)ing [shortcode](https://github.com/gohugoio/hugo/blob/master/tpl/tplimpl/embedded/templates/shortcodes/highlight.html) (or the default markup rendering for highlighting code). If you choose to display your highlighting section with line numbers that can be deep-linked, then you are in hot water, if you use two of these sections on a single page. The deeplinks are done via a counter system that is identical if both sections start with the line 1 (which they typically do) resulting in multiple id attributes of `#code-1`, `#code-2`, and so on for each first, second, and so on line.

The `highlight` template can be overridden easily by just adding your own shortcode template. Fixing this for the far more used highlighting markup of MarkDown (three backticks) since v0.93.0 GoHugo also offers [render hooks for code blocks](https://gohugo.io/templates/render-hooks/#render-hooks-for-code-blocks).

Expand Down
@@ -1,22 +1,18 @@
---
title: "Creating a GPG Key for Github/Gitlab Deployment"
title: Creating a GPG Key for Github/Gitlab Deployment
description: ""
summary: ""

date: 2022-02-23T22:43:14+07:00
publishDate: 2022-02-23T22:43:14+07:00
lastmod: 2022-02-23T22:43:14+07:00

lastmod: 2023-08-07T19:33:03+07:00
resources:
- title: "Photo by [Mauro Sbicego](https://unsplash.com/@maurosbicego) via [Unsplash](https://unsplash.com/)"
src: "mauro-sbicego-4hfpVsi-gSg-unsplash.jpg"

- title: Photo by [Mauro Sbicego](https://unsplash.com/@maurosbicego) via [Unsplash](https://unsplash.com/)
src: mauro-sbicego-4hfpVsi-gSg-unsplash.jpg
tags:
- encryption
- security
- github
- gitlab

---

Every now and then I have to add a GPG-key to one of my projects. Last week for instance a key expired that I used for a year to sign my commits. And every time that happens, I have to google how to create my key again. So let's go through the motions of how to create a new GPG key (which once you read through it all is astonishingly easy).
Expand All @@ -27,7 +23,7 @@ gpg2 --full-generate-key

This command creates a new GPG key. You will be asked to select a key type (I chose RSA/RSA), a key length (I chose 4096 bits) and a key expiration date (I chose 1 year from now). After this you get to setup the key configuration with your real name, email address and a comment. I chose the name and email address I use with Github and as comment a nice "GPG key for github/lab commits". After that you are asked to verify your setup and the key is created.

A popup will ask you for a password. In my case the setup is so that the key is saved to my local keychain that is loaded once per log in to my machine. This way I will have to enter my keys password once a day in normal cases, which is safe and nicely secure. Based on your local setup you might want to choose an empty password (if for instance your session is password secured and your computer will never be stolen or hacked, which will probably never happen, or once and then... well... ok, just choose a password here!). But don't. Add a secure password and your key is prepared.
A popup will ask you for a password. In my case the setup is so that the key is saved to my local keychain that is loaded once per log in to my machine. This way I will have to enter my keys password once a day in normal cases, which is safe and nicely secure. Based on your local setup you might want to choose an empty password (if for instance your session is password secured and your computer will never be stolen or hacked, which will probably never happen, or once and then well ok, just choose a password here!). But don't. Add a secure password and your key is prepared.

After this let GPG show your new key:

Expand All @@ -53,7 +49,7 @@ The code after rsa4096 in this sample, `40BCAA0B2E3817F4` is the ID of your key.
gpg2 --armor --export YOUR_KEY_ID
```

Replace YOUR_KEY_ID with the ID of your key (in the case above `40BCAA0B2E3817F4`). This will print your key on the CLI. Do not post this part online, because that is your secret key. Having this in a commit of your repo or anywhere other people can see it is a security risk and you should deprecate that key immediately.
Replace YOUR\_KEY\_ID with the ID of your key (in the case above `40BCAA0B2E3817F4`). This will print your key on the CLI. Do not post this part online, because that is your secret key. Having this in a commit of your repo or anywhere other people can see it is a security risk and you should deprecate that key immediately.

Take this key (everything including `-----BEGIN PGP PUBLIC KEY BLOCK-----` and `-----END PGP PUBLIC KEY BLOCK-----`) and copy it into the setup of your project. In Github you can find that in your [profile settings](https://github.com/settings/keys). Add a notice that reminds you of how this key came to be and all will be well.

Expand Down

0 comments on commit 220629d

Please sign in to comment.