Compare commits

..

No commits in common. "39ea0e95163cd1ecc903df1198961df9bbaec171" and "b425d47395580ab7076229ba1b843d483d26014a" have entirely different histories.

18 changed files with 106 additions and 369 deletions

14
.github/workflows/daily_build.yml vendored Normal file
View file

@ -0,0 +1,14 @@
name: Daily build
on:
schedule:
- cron: "0 13 * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Trigger build webhook on Netlify
run: curl -s -X POST "https://api.netlify.com/build_hooks/${TOKEN}"
env:
TOKEN: ${{ secrets.NETLIFY_CRON_BUILD_HOOK }}

View file

@ -1,46 +0,0 @@
name: Deploy Preview to Neocities
# only run on changes to preview
on:
push:
branches:
- preview
concurrency: # prevent concurrent deploys doing strange things
group: deploy-preview-to-neocities
cancel-in-progress: true
# Default to bash
defaults:
run:
shell: bash
jobs:
deploy:
name: Build and deploy Hugo site
runs-on: ubuntu-latest
steps:
- name: Hugo setup
uses: peaceiris/actions-hugo@v2.6.0
with:
hugo-version: '0.121.1'
extended: true
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build with Hugo
run: hugo --minify --environment preview
- name: Insert 404 page
run: |
cp public/404/index.html public/not_found.html
- name: Highlight with Torchlight
run: |
npm i @torchlight-api/torchlight-cli
npx torchlight
- name: Deploy to Neocities
uses: bcomnes/deploy-to-neocities@v1
with:
api_token: ${{ secrets.NEOCITIES_PREVIEW_API_TOKEN }}
cleanup: true
dist_dir: public

View file

@ -1,48 +0,0 @@
name: Deploy to Neocities
# only run on changes to main
on:
schedule:
- cron: 0 13 * * *
push:
branches:
- main
concurrency: # prevent concurrent deploys doing strange things
group: deploy-to-neocities
cancel-in-progress: true
# Default to bash
defaults:
run:
shell: bash
jobs:
deploy:
name: Build and deploy Hugo site
runs-on: ubuntu-latest
steps:
- name: Hugo setup
uses: peaceiris/actions-hugo@v2.6.0
with:
hugo-version: '0.121.1'
extended: true
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build with Hugo
run: hugo --minify
- name: Insert 404 page
run: |
cp public/404/index.html public/not_found.html
- name: Highlight with Torchlight
run: |
npm i @torchlight-api/torchlight-cli
npx torchlight
- name: Deploy to Neocities
uses: bcomnes/deploy-to-neocities@v1
with:
api_token: ${{ secrets.NEOCITIES_API_TOKEN }}
cleanup: true
dist_dir: public

View file

@ -1 +1 @@
[![Neocities Deployment Status](https://github.com/jbowdre/runtimeterror/actions/workflows/deploy-to-neocities.yml/badge.svg)](https://github.com/jbowdre/runtimeterror/actions/workflows/deploy-to-neocities.yml)
[![Netlify Status](https://api.netlify.com/api/v1/badges/7cd6b595-2b3b-403d-a29f-c4f27e8bd366/deploy-status)](https://app.netlify.com/sites/runtimeterrordev/deploys)

View file

@ -18,14 +18,13 @@ giscusInputPosition = "bottom"
giscusLang = "en"
giscusLoading = "lazy"
giscusMapping = "og:title"
giscusReactions = "0"
giscusReactions = "1"
giscusRepo = "jbowdre/site-comments"
giscusRepoId = "R_kgDOKKEGDw"
giscusStrict = "0"
giscusTheme = "noborder_gray"
analytics = true
kudos = true
[author]
name = "John Bowdre"
@ -172,8 +171,8 @@ title = "hugo"
url = "https://gohugo.io"
[[powerLinks]]
title = "neocities"
url = "https://neocities.org/about"
title = "netlify"
url = "https://www.netlify.com"
[[powerLinks]]
title = "risotto"
@ -184,8 +183,8 @@ title = "torchlight"
url = "https://torchlight.dev"
[[powerLinks]]
title = "tinylytics"
url = "https://tinylytics.app/home"
title = "cabin"
url = "https://withcabin.com/privacy/runtimeterror.dev"
[[verifyLinks]]
title = "omg.lol"

View file

@ -1,2 +1,2 @@
comments = false
comments = true
analytics = false

View file

@ -1 +1 @@
baseURL = "https://preview--runtimeterror.neocities.org/"
baseURL = "https://preview--runtimeterrordev.netlify.app"

View file

@ -3,7 +3,6 @@ title = "404'd!"
noindex = true
timeless = true
comments = true
kudos = false
+++
We're not sure what you were looking for but it's not here.

View file

@ -1,91 +0,0 @@
---
title: "Deploying a Hugo Site to Neocities with GitHub Actions"
date: 2024-01-21
# lastmod: 2024-01-21
description: "Using GitHub Actions to automatically deploy a Hugo website to Neocities."
featured: false
toc: true
comments: true
categories: Backstage
tags:
- hugo
- meta
- serverless
---
I came across [Neocities](https://neocities.org) many months ago, and got really excited by the premise: a free web host with the mission to bring back the *"fun, creativity and independence that made the web great."* I spent a while scrolling through the [gallery](https://neocities.org/browse) of personal sites and was amazed by both the nostalgic vibes and the creativity on display. It's like a portal back to when the web was fun. Neocities seemed like something I wanted to be a part of so I signed up for an account... and soon realized that I didn't *really* want to go back to crafting artisinal HTML by hand like I did in the early '00s. I didn't see an easy way to leverage my preferred static site generator[^lazy] so I filed it away and moved on.
[^lazy]: Also I'm kind of lazy, and not actually very good at web design anyway. I mean, you've seen my work.
Until yesterday, when I saw a post from [Sophie](https://social.lol/@sophie) on [How I deploy my Eleventy site to Neocities](https://localghost.dev/blog/how-i-deploy-my-eleventy-site-to-neocities/). I hadn't realized that Neocities had an [API](https://neocities.org/api), or that there was a [deploy-to-neocities](https://github.com/bcomnes/deploy-to-neocities) GitHub Action which uses that API to push content to Neocities. With that new-to-me information, I thought I'd give Neocities another try - a real one this time.
I had been hosting this site on Netlify's free plan [for a couple of years](/hello-hugo/) and haven't really encountered any problems. But I saw Neocities as a better vision of the internet, and I wanted to be a part of that[^passion]. So last night I upgraded to the $5/month [Neocities Supporter](https://neocities.org/supporter) plan which would let me use a custom domain for my site (along with higher storage and bandwidth limits).
[^passion]: Plus I love supporting passion projects.
I knew I'd need to make some changes to Sophie's workflow since my site is built with Hugo rather than Eleventy. I did some poking around and found [GitHub Actions for Hugo](https://github.com/peaceiris/actions-hugo) which would take care of installing Hugo for me. Then I'd just need to render the HTML with `hugo --minify` and use the [Torchlight](/spotlight-on-torchlight/) CLI to mark up the code blocks. Along the way, I also discovered that I'd need to overwrite `/not_found.html` to insert my custom 404 page so I included an extra step to do that. After that, I'll finally be ready to push the results to Neocities.
It took a bit of trial and error, but I eventually adapted this workflow which does the trick:
### The Workflow
```yaml
# torchlight! {"lineNumbers": true}
# .github/workflows/deploy-to-neocities.yml
name: Deploy to Neocities
on:
# Daily build to catch any future-dated posts
schedule:
- cron: 0 13 * * *
# Build on pushes to the main branch only
push:
branches:
- main
concurrency:
group: deploy-to-neocities
cancel-in-progress: true
defaults:
run:
shell: bash
jobs:
deploy:
name: Build and deploy Hugo site
runs-on: ubuntu-latest
steps:
# Install Hugo in the runner
- name: Hugo setup
uses: peaceiris/actions-hugo@v2.6.0
with:
hugo-version: '0.121.1'
extended: true
# Check out the source for the site
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
# Build the site with Hugo
- name: Build with Hugo
run: hugo --minify
# Copy my custom 404 page to not_found.html so it
# will be picked up by Neocities
- name: Insert 404 page
run: |
cp public/404/index.html public/not_found.html
# Highlight code blocks with the Torchlight CLI
- name: Highlight with Torchlight
run: |
npm i @torchlight-api/torchlight-cli
npx torchlight
# Push the rendered site to Neocities and
# clean up any orphaned files
- name: Deploy to Neocities
uses: bcomnes/deploy-to-neocities@v1
with:
api_token: ${{ secrets.NEOCITIES_API_TOKEN }}
cleanup: true
dist_dir: public
```
I'm thrilled with how well this works, and happy to have learned a bit more about GitHub Actions in the process. Big thanks to Sophie for pointing me in the right direction!

View file

@ -1,46 +0,0 @@
---
title: "Enabling FIPS Compliance Fixes Aria Lifecycle 8.14"
date: 2024-01-19
# lastmod: 2024-01-19
description: "Never in my life have I seen enabling FIPS *fix* a problem - until now."
featured: false
comments: true
categories: VMware
tags:
- vmware
---
This week, VMware posted [VMSA-2024-0001](https://www.vmware.com/security/advisories/VMSA-2024-0001.html) which details a critical (9.9/10) vulnerability in <s>vRealize</s> *Aria* Automation. While working to get our environment patched, I ran into an interesting error on our Aria Lifecycle appliance:
```log
Error Code: LCMVRAVACONFIG590024
VMware Aria Automation hostname is not valid or unable to run the product specific commands via SSH on the host. Check if VMware Aria Automation is up and running.
VMware Aria Automation hostname is not valid or unable to run the product specific commands via SSH on the host. Check if VMware Aria Automation is up and running.
com.vmware.vrealize.lcm.drivers.vra80.exception.VraVaProductNotFoundException: Either provided hostname: <VMwareAriaAutomationFQDN> is not a valid VMware Aria Automation hostname or unable to run the product specific commands via SSH on the host.
at com.vmware.vrealize.lcm.drivers.vra80.helpers.VraPreludeInstallHelper.getVraFullVersion(VraPreludeInstallHelper.java:970)
at com.vmware.vrealize.lcm.drivers.vra80.helpers.VraPreludeInstallHelper.checkVraApplianceAndVersion(VraPreludeInstallHelper.java:978)
at com.vmware.vrealize.lcm.drivers.vra80.helpers.VraPreludeInstallHelper.getVraProductDetails(VraPreludeInstallHelper.java:754)
at com.vmware.vrealize.lcm.plugin.core.vra80.task.VraVaImportEnvironmentTask.execute(VraVaImportEnvironmentTask.java:145)
at com.vmware.vrealize.lcm.platform.automata.service.Task.retry(Task.java:158)
at com.vmware.vrealize.lcm.automata.core.TaskThread.run(TaskThread.java:60)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
```
Digging further into the appliance logs revealed some more details:
```log
Session.connect: java.security.spec.InvalidKeySpecException: key spec not recognized
```
That seems like a much more insightful error than "the hostname is not valid, dummy."
Anyhoo, searching for the error took me to a VMware KB on the subject:
- [VMware Aria Suite Lifecycle 8.14 Patch 1 Day 2 operations fail for VMware Aria Automation with error code LCMVRAVACONFIG590024 (96243)](https://kb.vmware.com/s/article/96243)
> After applying VMware Aria Suite Lifecycle 8.14 Patch 1, you may encounter deployment and day-2 operation failures, attributed to the elimination of weak algorithms in Suite Lifecycle. To prevent such issues, it is recommended to either turn on FIPS in VMware Aria Suite Lifecycle or implement the specified workarounds on other VMware Aria Products, as outlined in the article Steps for Removing SHA1 weak Algorithms/Ciphers from all VMware Aria Products.
That's right. According to the KB, the solution for the untrusted encryption algorithms is to *enable* FIPS compliance. I was skeptical: I've never seen FIPS enforcement fix problems, it always causes them.
But I gave it a shot, and *holy crap it actually worked!* Enabling FIPS compliance on the Aria Lifecycle appliance got things going again.
I feel like I've seen everything now.

View file

@ -97,7 +97,6 @@ resources:
And I will add in a `storage` property as well which will automatically adjust the deployed VMDK size to match the specified input:
```yaml
# torchlight! {"torchlightAnnotations": false}
# torchlight! {"lineNumbers": true}
[...]
description: '${input.description}'
@ -203,6 +202,7 @@ inputs:
type: string
title: Point of Contact Email
default: jack.shephard@example.com
pattern: '^[^\s@]+@[^\s@]+\.[^\s@]+$'
ticket:
type: string
title: Ticket/Request Number
@ -292,7 +292,7 @@ Once all those constants are created I can move on to the meat of this little pr
#### ABX Action
I'll click back to **Extensibility > Library > Actions** and then **+ New Action**. I give the new action a clever title and description:
![Create a new action](20210901_create_action.png)
![Create a new action](20210901_create_action.png)]
I then hit the language dropdown near the top left and select to use `powershell` so that I can use those sweet, sweet PowerCLI cmdlets.
![Language selection](20210901_action_select_language.png)

View file

@ -1,24 +1,7 @@
{{ define "main" }}
{{- $ageDays := div (sub now.Unix .Date.Unix) 86400 -}}
<header class="content__header">
<div class="frontmatter">
<hr>
<table class="frontmatter">
<tr><td class="label">title:</td><td class="title">{{ .Title | markdownify }}</td></tr>
{{- if .Params.date }}
{{- $postDate := .Date.Format "2006-01-02" }}
{{- $updateDate := .Lastmod.Format "2006-01-02" }}
<tr><td class="label">posted:</td><td class="content">{{ $postDate }}</td></tr>
{{- if ne $postDate $updateDate }}
<tr><td class="label">updated:</td><td class="content">{{ $updateDate }}</td></tr>
{{ end }}
{{ end }}
{{- with .Params.tags }}{{- $tagCount := len . }}
<tr class="frontmatter_tags"><td>tags:</td><td>{{- if gt $tagCount 5 }}<details><summary>See all {{ $tagCount }} tags...</summary>{{- end }}[&quot;<a href="/tags">all</a>&quot; {{- range . }}{{- $tag := urlize . }}{{ if $tag }}, {{ end }}&quot;<a href='{{ absLangURL (printf "tags/%s" $tag) }}'>{{ . }}</a>&quot;{{- end }}]{{- if gt $tagCount 5 }}</details>{{- end }}</td></tr>
{{- end }}
</table>
<hr>
</div>
<h1>{{ .Title | markdownify }}</h1>
</header>
{{- with .Param "lastmod" -}}
{{- $ageDays = div (sub now.Unix .Unix) 86400 -}}
@ -33,7 +16,6 @@
<div class="content__body">
{{ .Content }}
</div>
{{- $showComments := true }}
{{- if eq .Site.Params.comments false }}
{{- $showComments = false }}
@ -41,16 +23,6 @@
{{- $showComments = false }}
{{- end }}
{{- if ne $showComments false }}
<hr>
{{- $showKudos := true }}
{{- if eq .Site.Params.kudos false }}
{{- $showKudos = false }}
{{- else if eq .Params.kudos false }}
{{- $showKudos = false }}
{{- end }}
{{- if and (eq .Site.Params.analytics true) (ne $showKudos false) }}
<span class="post_kudos">Celebrate this post:&nbsp;<button class="tinylytics_kudos"></button></span>
{{- end }}
{{- partial "comments" . }}
{{- end }}
<footer class="content__footer"></footer>

View file

@ -1,10 +1,30 @@
{{ if .Params.description }}<p>{{ .Params.description }}</p><hr>{{ end }}
{{ if and (gt .WordCount 400 ) (gt (len .TableOfContents) 180) }}
<p>
<h3>On this page</h3>
{{ .TableOfContents }}
{{- $postDate := .Date.Format "2006-01-02" }}
{{- $updateDate := .Lastmod.Format "2006-01-02" }}
{{ if or (.Params.description) (.Params.date) }}
{{ if .Params.description }}<p>{{ .Params.description }}</p>{{ end }}
<p>
{{ if .Params.date }}<table><tr><td>posted:</td><td>{{ $postDate }}</td></tr>{{- if ne $postDate $updateDate }}<tr><td>updated:</td><td>{{ $updateDate }}</td></tr>{{ end }}</table>{{ end }}
</p>
<hr>
</p>
{{ if and (gt .WordCount 400 ) (gt (len .TableOfContents) 180) }}
<p>
<h3>On this page</h3>
{{ .TableOfContents }}
<hr>
</p>
{{ end }}
{{- with .Params.tags -}}
<p>
<h3>Tags</h3>
[<a href="/tags">all</a>]
{{- range . }}
{{- $tag := urlize . -}}
[<a href='{{ absLangURL (printf "tags/%s" $tag) }}' title="{{ . }}">{{ . }}</a>]
{{- end }}
<br><br>
<hr>
</p>
{{- end }}
{{ end }}
{{ if isset .Params "categories" }}
@ -42,8 +62,3 @@
<hr>
<h3>status.lol</h3>
<script src="https://status.lol/jbowdre.js?time&link&fluent&pretty"></script>
{{- if eq .Site.Params.analytics true }}
<hr>
<h3>Webring</h3>
<a href="" target="_blank" class="tinylytics_webring">🕸️<img class="tinylytics_webring_avatar" src="" style="display: none"/>💍</a>
{{- end }}

View file

@ -6,7 +6,11 @@
<!-- Back to Top button via https://github.com/vfeskov/vanilla-back-to-top -->
{{ $jsToTop := resources.Get "js/back-to-top.js" | minify }}
<script src="{{ $jsToTop.RelPermalink }}"></script>
<script>addBackToTop()</script>
<script>addBackToTop({
diameter: 56,
backgroundColor: '#383838',
textColor: '#c45a5a'
})</script>
<!-- Search index via https://victoria.dev/blog/add-search-to-hugo-static-sites-with-lunr/ -->
{{ partial "search-index.html" .}}

View file

@ -34,9 +34,9 @@
<link rel="stylesheet" href="{{ "css/risotto.css" | absURL }}">
<link rel="stylesheet" href="{{ "css/custom.css" | absURL }}">
{{ if eq .Site.Params.analytics true }}
<!-- tinylytics -->
<script src="https://tinylytics.app/embed/z4bwvaCBkF39NcDDLsRu.js?kudos=🎉&webring=avatars" defer></script>
{{ if .Site.Params.analytics }}
<!-- cabin analytics -->
<script async defer src="https://scripts.withcabin.com/hello.js"></script>
{{ end }}
<!-- syntax highlighting -->

39
netlify.toml Normal file
View file

@ -0,0 +1,39 @@
[build]
publish = "public"
[build.environment]
HUGO_VERSION = "0.121.1"
[context.production]
command = """
hugo
npm i @torchlight-api/torchlight-cli
npx torchlight
"""
[context.preview]
command = """
hugo --environment preview
npm i @torchlight-api/torchlight-cli
npx torchlight
"""
[[headers]]
for = "/*"
[headers.values]
X-Robots-Tag = "noindex"
[context.drafts]
command = """
hugo --environment drafts -D
npm i @torchlight-api/torchlight-cli
npx torchlight
"""
[[headers]]
for = "/*"
[headers.values]
X-Robots-Tag = "noindex"
[[redirects]]
from = "/*"
to = "/404/"
status = 404

View file

@ -260,6 +260,7 @@ form button {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
grid-gap: 0.5rem;
/* justify-content: center; */
margin: 0.5rem 0;
}
@ -273,79 +274,4 @@ form button {
.date {
font-size: 0.8rem;
color: var(--off-fg);
}
/* blockquote styling */
blockquote {
font-style: italic;
border-left: 0.25rem solid var(--logo);
padding-left: 0.25rem;
}
/* tinylytics kudos styling*/
.post_kudos {
display: flex;
}
button.tinylytics_kudos {
border: 0;
background-color: transparent;
cursor: pointer;
display: flex;
color: var(--off-fg);
font-size: 1.2rem;
padding: 0;
transition: all .2s ease-in-out;
}
button.tinylytics_kudos:hover {
transform: scale(1.1);
text-shadow: var(--off-fg) 0 0 1px;
}
/* post front matter styling*/
.frontmatter hr {
margin-bottom: 0rem;
margin-top: 0rem;
}
.frontmatter h1 {
margin-top: 0rem;
}
.frontmatter .label {
color: var(--off-fg);
font-size: 0.8rem;
}
.frontmatter .title {
color: var(--fg);
font-weight: 600;
font-size: 1.1rem;
}
.frontmatter table {
overflow-wrap: break-word;
margin-bottom: 0rem;
}
.frontmatter_tags {
font-size: 0.8rem;
color: var(--off-fg);
}
/* back-to-top styling */
#back-to-top {
background: var(--inner-bg);
height: 56px;
width: 56px;
}
#back-to-top svg {
fill: var(--link);
}
/* footnote link styling */
.footnote-backref {
text-decoration: none;
}

View file

@ -2,20 +2,20 @@
*/
:root {
--base00: #090909; /* bg */
--base01: #1c1c1c; /* off-bg */
--base02: #292929; /* inner-bg */
--base03: #6d6c6c; /* muted */
--base00: #181818; /* bg */
--base01: #282828; /* off-bg */
--base02: #383838; /* inner-bg */
--base03: #585858; /* muted */
--base04: #abaaaa; /* off-fg */
--base05: #d8d8d8; /* fg */
--base06: #75f558; /* code */
--base06: #cfcfcf; /* code */
--base07: #5f8700; /* user prompt */
--base08: #ab4642; /* root prompt */
--base09: #dc9656;
--base0A: #f7ca88; /* highlight */
--base0B: #682523; /* logo */
--base0B: #772a28; /* logo */
--base0C: #ab2321; /* hover */
--base0D: #d36060; /* link */
--base0D: #c45a5a; /* link */
--base0E: #ba8baf;
--base0F: #a16946;
}