mirror of
https://github.com/jbowdre/runtimeterror.git
synced 2024-11-22 15:02:18 +00:00
Compare commits
10 commits
85a5a68f46
...
7a67dad462
Author | SHA1 | Date | |
---|---|---|---|
7a67dad462 | |||
e310192cd1 | |||
f484bb98d7 | |||
036c7825a2 | |||
a14609c559 | |||
6f1ec82c29 | |||
3442f2d483 | |||
a60ebcb1ec | |||
4e6095e5ff | |||
c100a122df |
6 changed files with 112 additions and 29 deletions
54
.github/workflows/deploy-to-neocities.yml
vendored
Normal file
54
.github/workflows/deploy-to-neocities.yml
vendored
Normal file
|
@ -0,0 +1,54 @@
|
|||
name: Deploy to neocities
|
||||
|
||||
# only run on changes to main
|
||||
on:
|
||||
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:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
HUGO_VERSION: "0.121.1"
|
||||
steps:
|
||||
- name: Install Hugo CLI
|
||||
run: |
|
||||
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
|
||||
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
|
||||
- name: Install Dart Sass
|
||||
run: sudo snap install dart-sass
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install Node.js dependencies
|
||||
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
|
||||
- name: Build with Hugo
|
||||
env:
|
||||
# For maximum backward compatibility with Hugo modules
|
||||
HUGO_ENVIRONMENT: production
|
||||
HUGO_ENV: production
|
||||
run: |
|
||||
hugo \
|
||||
--minify \
|
||||
--baseURL "https://runtimeterror.dev/"
|
||||
- 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: false
|
||||
dist_dir: public
|
|
@ -171,8 +171,8 @@ title = "hugo"
|
|||
url = "https://gohugo.io"
|
||||
|
||||
[[powerLinks]]
|
||||
title = "netlify"
|
||||
url = "https://www.netlify.com"
|
||||
title = "neocities"
|
||||
url = "https://neocities.org/about"
|
||||
|
||||
[[powerLinks]]
|
||||
title = "risotto"
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
+++
|
||||
title = "404'd!"
|
||||
aliases = ["not_found"]
|
||||
noindex = true
|
||||
timeless = true
|
||||
comments = true
|
||||
|
|
|
@ -1,7 +1,24 @@
|
|||
{{ define "main" }}
|
||||
{{- $ageDays := div (sub now.Unix .Date.Unix) 86400 -}}
|
||||
<header class="content__header">
|
||||
<h1>{{ .Title | markdownify }}</h1>
|
||||
<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 }}["<a href="/tags">all</a>" {{- range . }}{{- $tag := urlize . }}{{ if $tag }}, {{ end }}"<a href='{{ absLangURL (printf "tags/%s" $tag) }}'>{{ . }}</a>"{{- end }}]{{- if gt $tagCount 5 }}</details>{{- end }}</td></tr>
|
||||
{{- end }}
|
||||
</table>
|
||||
<hr>
|
||||
</div>
|
||||
</header>
|
||||
{{- with .Param "lastmod" -}}
|
||||
{{- $ageDays = div (sub now.Unix .Unix) 86400 -}}
|
||||
|
|
|
@ -1,30 +1,10 @@
|
|||
{{- $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>
|
||||
{{ 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 }}
|
||||
<hr>
|
||||
{{ 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 }}
|
||||
</p>
|
||||
{{ end }}
|
||||
|
||||
{{ if isset .Params "categories" }}
|
||||
|
|
|
@ -303,3 +303,34 @@ 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);
|
||||
}
|
Loading…
Reference in a new issue