Compare commits

...

9 commits

6 changed files with 68 additions and 2 deletions

View file

@ -0,0 +1,46 @@
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

1
config/preview/hugo.toml Normal file
View file

@ -0,0 +1 @@
baseURL = "https://preview--runtimeterror.neocities.org/"

View file

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

View file

@ -42,3 +42,7 @@
<hr> <hr>
<h3>status.lol</h3> <h3>status.lol</h3>
<script src="https://status.lol/jbowdre.js?time&link&fluent&pretty"></script> <script src="https://status.lol/jbowdre.js?time&link&fluent&pretty"></script>
{{- if eq .Site.Params.analytics true }}
<hr>
<a href="" target="_blank" class="tinylytics_webring"><img class="tinylytics_webring_avatar" src="" style="display: none"/>Tinylytics Webring</a>
{{- end }}

View file

@ -36,7 +36,7 @@
{{ if eq .Site.Params.analytics true }} {{ if eq .Site.Params.analytics true }}
<!-- tinylytics --> <!-- tinylytics -->
<script src="https://tinylytics.app/embed/z4bwvaCBkF39NcDDLsRu.js?kudos=🎉" defer></script> <script src="https://tinylytics.app/embed/z4bwvaCBkF39NcDDLsRu.js?kudos=🎉&webring=avatars" defer></script>
{{ end }} {{ end }}
<!-- syntax highlighting --> <!-- syntax highlighting -->

View file

@ -282,7 +282,7 @@ blockquote {
padding-left: 0.25rem; padding-left: 0.25rem;
} }
/* tinylytics kudos styling*/ /* tinylytics styling*/
.post_kudos { .post_kudos {
display: flex; display: flex;
} }
@ -303,6 +303,14 @@ button.tinylytics_kudos:hover {
text-shadow: var(--off-fg) 0 0 1px; text-shadow: var(--off-fg) 0 0 1px;
} }
img.tinylytics_webring_avatar {
border-radius: 100%;
height: 2rem;
width: 2rem;
vertical-align:middle;
margin-right: 0.5rem;
}
/* post front matter styling*/ /* post front matter styling*/
.frontmatter hr { .frontmatter hr {
margin-bottom: 0rem; margin-bottom: 0rem;
@ -348,4 +356,9 @@ button.tinylytics_kudos:hover {
/* footnote link styling */ /* footnote link styling */
.footnote-backref { .footnote-backref {
text-decoration: none; text-decoration: none;
}
/* hr override */
hr {
margin-top: 1.5rem;
} }