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>
<h3>status.lol</h3>
<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 }}
<!-- 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 }}
<!-- syntax highlighting -->

View file

@ -282,7 +282,7 @@ blockquote {
padding-left: 0.25rem;
}
/* tinylytics kudos styling*/
/* tinylytics styling*/
.post_kudos {
display: flex;
}
@ -303,6 +303,14 @@ button.tinylytics_kudos:hover {
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*/
.frontmatter hr {
margin-bottom: 0rem;
@ -349,3 +357,8 @@ button.tinylytics_kudos:hover {
.footnote-backref {
text-decoration: none;
}
/* hr override */
hr {
margin-top: 1.5rem;
}