Compare commits

..

29 Commits

Author SHA1 Message Date
8230f0cb10 update theme
All checks were successful
Build Hugo Site / build (push) Successful in 7s
2025-01-08 16:52:37 -07:00
ecfb422394 Create note: 20250108234637
All checks were successful
Build Hugo Site / build (push) Successful in 7s
2025-01-09 00:46:37 +01:00
bd4863bea9 Create note: 20250108234551
All checks were successful
Build Hugo Site / build (push) Successful in 7s
2025-01-09 00:45:51 +01:00
ab2acbc7e2 update theme version
All checks were successful
Build Hugo Site / build (push) Successful in 7s
2025-01-08 16:36:51 -07:00
e8ce333184 json feed work
All checks were successful
Build Hugo Site / build (push) Successful in 6s
2025-01-08 16:21:12 -07:00
cb3148202d troubleshooting
All checks were successful
Build Hugo Site / build (push) Successful in 6s
2025-01-08 15:50:06 -07:00
b1b7dd1ebd theme version mixup
All checks were successful
Build Hugo Site / build (push) Successful in 7s
2025-01-08 15:27:57 -07:00
abd1e47f3a update theme version
All checks were successful
Build Hugo Site / build (push) Successful in 8s
2025-01-08 15:26:34 -07:00
67129a184c Merge pull request 'add-indieweb-theme' (#1) from add-indieweb-theme into main
All checks were successful
Build Hugo Site / build (push) Successful in 35s
Reviewed-on: #1
2025-01-08 04:25:56 +01:00
dbe8da7f48 final theme version for tonight
Some checks failed
Build Hugo Site / build (push) Failing after 4m28s
2025-01-07 20:24:08 -07:00
5f5dfbb4ce theme fix
Some checks failed
Build Hugo Site / build (push) Failing after 4m27s
2025-01-07 20:19:46 -07:00
18a5b41afc added demo photo and note
Some checks failed
Build Hugo Site / build (push) Failing after 4m27s
2025-01-07 20:11:44 -07:00
f4ef0a5a2f moved posts to articles and fixed pagination
Some checks failed
Build Hugo Site / build (push) Failing after 4m27s
2025-01-07 19:59:35 -07:00
4c5d682efa streamlined TOML
Some checks failed
Build Hugo Site / build (push) Failing after 4m29s
2025-01-07 14:03:26 -07:00
825aaf3214 add indieweb-starter-theme
Some checks failed
Build Hugo Site / build (push) Failing after 4m26s
2025-01-07 13:38:47 -07:00
24444d0a41 remove trash
Some checks failed
Build Hugo Site / build (push) Failing after 7s
2025-01-07 13:34:42 -07:00
6cc31c6456 removed old theme files
Some checks failed
Build Hugo Site / build (push) Failing after 7s
2025-01-07 13:32:57 -07:00
a23bf84710 remove old theme 2025-01-07 13:31:45 -07:00
075745f1c1 add discovery data to head
All checks were successful
Build Hugo Site / build (push) Successful in 10s
2025-01-06 19:55:10 -07:00
0907d476d8 add indieauth to head
All checks were successful
Build Hugo Site / build (push) Successful in 11s
2025-01-06 19:11:53 -07:00
f2526f6c62 took it out of draft mode
All checks were successful
Build Hugo Site / build (push) Successful in 9s
2024-12-27 20:30:51 -07:00
817e0cb36d added post on json feeds
All checks were successful
Build Hugo Site / build (push) Successful in 10s
2024-12-27 20:28:24 -07:00
2865bd8e6d quick config update
All checks were successful
Build Hugo Site / build (push) Successful in 10s
2024-12-27 20:07:58 -07:00
102371ff87 attempt at adding a json feed
All checks were successful
Build Hugo Site / build (push) Successful in 10s
2024-12-27 19:59:45 -07:00
1541ae8c69 update old post to test description
All checks were successful
Build Hugo Site / build (push) Successful in 39s
2024-12-27 19:12:28 -07:00
05179c864b update gitignore
All checks were successful
Build Hugo Site / build (push) Successful in 8s
2024-11-20 09:43:48 -07:00
28bd84cd87 readd feeds folder
All checks were successful
Build Hugo Site / build (push) Successful in 8s
2024-11-20 09:06:03 -07:00
8cb01f9318 Optimize build job & add subtitle
All checks were successful
Build Hugo Site / build (push) Successful in 9s
2024-11-19 20:30:16 -07:00
5093d43413 final test of builder by adding linkedin social
All checks were successful
Build Hugo Site / build (push) Successful in 9s
2024-11-19 15:16:08 -07:00
20 changed files with 221 additions and 124 deletions

View File

@@ -6,17 +6,13 @@ jobs:
build:
runs-on: docker
steps:
- run: apk add --no-cache nodejs
- run: apk add --no-cache nodejs rsync
- run: apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community hugo
- uses: actions/checkout@v4
with:
submodules: 'true'
- uses: actions/setup-go@v3
with:
go-version: '>=1.17.0'
- run: go version
- run: apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community hugo
- run: hugo version
- run: hugo
- run: ls -lah
- run: apk add rsync
- run: rsync -avz --delete ./public/ /sites/tsol/

33
.gitignore vendored
View File

@@ -1,2 +1,31 @@
public/
.hugo_build.lock
# Hugo's default build folder
/public/
# Hugo's data folder (optional, depends on your project)
/data/
# Hugo's cache folder
/cache/
# Hugo's content folder can have media, drafts or temporary files that you don't want to commit
/content/drafts/
/content/images/
/content/sections/
# OS generated files
.DS_Store
Thumbs.db
# IDE or text editor files
.idea/
.vscode/
# Node.js and other dependencies
node_modules/
yarn.lock
package-lock.json
# Temporary files
*.bak
*.swp
.hugo_build.lock

7
.gitmodules vendored
View File

@@ -1,4 +1,3 @@
[submodule "themes/hermit-v2"]
path = themes/hermit-v2
url = https://github.com/1bl4z3r/hermit-V2
branch = main
[submodule "themes/hugo-indieweb-starter"]
path = themes/hugo-indieweb-starter
url = https://git.thesatelliteoflove.com/phil/hugo-indieweb-starter.git

View File

@@ -0,0 +1,109 @@
---
title: "Add a Json Feed to Any Hugo Site"
aliases: ["/posts/add-a-json-feed-to-any-hugo-site"]
date: 2024-12-27T20:13:26-07:00
draft: false
toc: false
description: "I fought with Hugo to add a JSON Feed so you don't have to #hugo #posse"
images:
tags:
- posse
- hugo
---
Super quick post tonight as a precursor to a post that I am working on about me adopting a "Post Once Syndicate Everywhere" ([POSSE](https://indieweb.org/POSSE)) strategy for my content.
I just spent way too long wrestling with Hugo (which runs this site) to add a [JSON Feed](https://www.jsonfeed.org/) compatible feed so that I can more reliably publish updates to this blog to the Fediverse/Threads/Bluesky and discovered that, ultimately, it is actually really simple. So I decided t document here in case anyone else needs a hand.
1. Add the following to your hugo.toml file
```
[outputFormats.jsonfeed]
mediaType = "application/json"
baseName = "feed"
rel = "alternate"
isPlainText = true
[outputs]
home = ["html", "jsonfeed", "rss"]
section = ["html", "jsonfeed", "rss"]
```
This creates the JSON Feed output format and adds the outputs to both "Home" and each section (for example, Posts).
2. In the root of your project (no need to mess with the theme if you are using one) make sure you have a layouts folder, and a _default folder inside of it (so layouts/_default)
3. In the layouts/_default directory create list.jsonfeed.json and copy the following into it:
```
{{- $pctx := . -}}
{{- if .IsHome -}}{{ $pctx = site }}{{- end -}}
{{- $pages := slice -}}
{{- if or $.IsHome $.IsSection -}}
{{- $pages = $pctx.RegularPages -}}
{{- else -}}
{{- $pages = $pctx.Pages -}}
{{- end -}}
{{- $limit := site.Config.Services.RSS.Limit -}}
{{- if ge $limit 1 -}}
{{- $pages = $pages | first $limit -}}
{{- end -}}
{{- $title := "" }}
{{- if eq .Title .Site.Title }}
{{- $title = .Site.Title }}
{{- else }}
{{- with .Title }}
{{- $title = print . " on "}}
{{- end }}
{{- $title = print $title .Site.Title }}
{{- end }}
{
"version": "https://jsonfeed.org/version/1.1",
"title": {{ $title | jsonify }},
"home_page_url": {{ .Permalink | jsonify }},
{{- with .OutputFormats.Get "jsonfeed" }}
"feed_url": {{ .Permalink | jsonify }},
{{- end }}
{{- if (or .Site.Params.author .Site.Params.author_url) }}
"authors": [{
{{- if .Site.Params.author }}
"name": {{ .Site.Params.author | jsonify }},
{{- end }}
{{- if .Site.Params.author_url }}
"url": {{ .Site.Params.author_url | jsonify }}
{{- end }}
}],
{{- end }}
{{- if $pages }}
"items": [
{{- range $index, $element := $pages }}
{{- with $element }}
{{- if $index }},{{end}} {
"title": {{ .Title | jsonify }},
"id": {{ .Permalink | jsonify }},
"tags": ["{{ delimit .Params.tags "," }}"]
"url": {{ .Permalink | jsonify }},
{{- if .Site.Params.showFullTextinJSONFeed }}
"summary": {{ with .Description }}{{ . | jsonify }}{{ else }}{{ .Summary | jsonify }}{{ end -}},
"content_html": {{ .Content | jsonify }},
{{- else }}
"content_text": {{ with .Description }}{{ . | jsonify }}{{ else }}{{ .Summary | jsonify }}{{ end -}},
{{- end }}
{{- if .Params.cover.image }}
{{- $cover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }}
{{- if $cover }}
"image": {{ (path.Join .RelPermalink $cover) | absURL | jsonify }},
{{- end }}
{{- end }}
"date_published": {{ .Date.Format "2006-01-02T15:04:05Z07:00" | jsonify }}
}
{{- end }}
{{- end }}
]
{{ end }}
}
```
This lets Hugo know how to format these feeds.
... And that's it! You can check out my JSON feed at https://thesatelliteoflove.com/posts/feed/json

View File

@@ -1,9 +1,11 @@
---
title: "What I am self hosting - November 2024 edition"
aliases: ["/posts/add-a-json-feed-to-any-hugo-site"]
date: 2024-11-17T16:23:59-07:00
draft: false
toc: false
images:
description: "A quick update on my selfhosting stack as of November 2024 #selfhosting"
tags:
- selfhosting
---

View File

@@ -0,0 +1,6 @@
---
date: "2025-01-08"
type: "notes"
---
test note

View File

@@ -0,0 +1,6 @@
---
date: "2025-01-08"
type: "notes"
---
yet another test note

5
content/notes/_index.md Normal file
View File

@@ -0,0 +1,5 @@
---
title: "Notes"
type: "notes"
outputs: ["HTML", "jsonfeed"]
---

6
content/notes/note1.md Normal file
View File

@@ -0,0 +1,6 @@
---
date: "2025-01-07"
type: "notes"
---
This is a quick thought or observation without a title. #Microblogging

6
content/notes/note2.md Normal file
View File

@@ -0,0 +1,6 @@
---
date: "2025-01-07"
type: "notes"
---
This is another quick thought or observation without a title. #Microblogging

8
content/photos/pika.md Normal file
View File

@@ -0,0 +1,8 @@
---
title: "Sunset at the Beach"
date: "2025-01-07"
type: "photos"
image: "/images/IMG_0704-1.jpeg"
---
Captured this beautiful sunset while walking along the beach. 🌅

139
hugo.toml
View File

@@ -1,126 +1,49 @@
# THIS IS AN EXAMPLE ON HOW YOU SHOULD CONFIGURE YOUR hugo.toml
# See this hugo.toml in action at https://github.com/1bl4z3r/hermit-V2/blob/staging/hugo.toml
# Example Site is Staging branch, acessible at https://github.com/1bl4z3r/hermit-V2/tree/staging
# To see what each config does, refer to https://1bl4z3r.github.io/hermit-V2/en/posts/explaining-configs/
# Open Issue or Pull Request at https://github.com/1bl4z3r/hermit-V2
baseURL = "https://thesatelliteoflove.com"
# defaultContentLanguage = "en"
# defaultContentLanguageInSubdir = true
theme = "hermit-v2"
#[languages]
# [languages.en]
# title = 'CHANGE ME'
# [languages.en.params]
# homeSubtitle = "CHANGE ME"
# weight = 1
# [languages.fr]
# title = 'CHANGE ME(FR)'
# [languages.fr.params]
# homeSubtitle = "CHANGE ME"
# weight = 2
# [languages.it]
# title = 'CHANGE ME(IT)'
# [languages.it.params]
# homeSubtitle = "CHANGE ME"
# weight = 3
theme = "hugo-indieweb-starter"
languageCode = "en-us"
title = "The Satellite of Love"
# enableGitInfo = true
pygmentsCodefences = true
pygmentsUseClasses = true
#hasCJKLanguage = true
pygmentsCodefences = true
pygmentsUseClasses = true
rssLimit = 10
paginate = 10
copyright = "The Satellite of Love"
enableEmoji = true
#[services]
# [services.disqus]
# shortname = ''
# [services.googleAnalytics]
# id = ''
[frontmatter]
date = ["date", "publishDate", "lastmod"]
lastmod = ["lastmod", ":git", "date", "publishDate"]
publishDate = ["publishDate", "date"]
expiryDate = ["expiryDate"]
# [params.author]
# name = "Phil Skents"
# about = "Assitant janitor of The Satellite of Love"
[blackfriday]
# hrefTargetBlank = true
# noreferrerLinks = true
# nofollowLinks = true
[taxonomies]
tag = "tags"
# Categories are disabled by default.
# category = "categories"
tag = "tags"
# Enable to get proper Mathjax support
#[markup]
# [markup.goldmark]
# [markup.goldmark.extensions]
# [markup.goldmark.extensions.passthrough]
# enable = true
# [markup.goldmark.extensions.passthrough.delimiters]
# block = [['\[', '\]'], ['$$', '$$']]
# inline = [['\(', '\)']]
[params.author]
name = "Phil Skents"
url = "https://thesatelliteoflove.com"
email = "phil@thesatelliteoflove.com" # Optional: Use if contact info is public
about = "Web tinkerer, IndieWeb enthusiast, and janitor of the Satellite of Love."
avatar = "static/images/author-avatar.png" # Optional: Path to an avatar image
mastodon = "https://social.thesatelliteoflove.com/users/phil"
[params]
dateform = "Jan 2, 2006"
dateformShort = "Jan 2"
dateformNum = "2006-01-02"
dateformNumTime = "2006-01-02 15:04 -0700"
# description = "CHANGE ME SITE DESCRIPTION"
# images = [""]
# Basic site metadata
homeSubtitle = "Phil's IndieWeb Experiments"
footerCopyright = "The Satellite of Love"
themeColor = "#494f5c"
#homeSubtitle = "CHANGE ME HOME SUBTITLE"
footerCopyright = "The Satellite of Love"
# footerHideThemeName = false
# bgImg = ""
# gitUrl = "https://github.com/1bl4z3r/hermit-V2/tree/staging"
# IndieWeb Features
enableWebmentions = true # To toggle webmention support
enableMicropub = true # Enable Micropub endpoint functionality
syndicationTargets = ["Mastodon", "Bluesky", "GitHub"] # Supported syndication
justifyContent = false
# Post options
dateform = "Jan 2, 2006"
dateformShort = "Jan 2"
dateformNum = "2006-01-02"
relatedPosts = true
code_copy_button = true
homeSubtitlePrinter = true
scrollToTop = true
global_mathjax = false
readTime = true
readTimeSeparator = "-"
# legacyLayout = false
shareSocial = true
# googleTagManager = "GTM-XXXXXXXX"
# tagSymbol = "#"
# categorySymbol = "⊲"
# pinned = "Pinned Posts"
# pinnedSVGname = "pin"
# descriptionInPosts= true
# initialPublish = "Initally Posted on: "
# human = ["single","posts"]
# noIndex = false
# denyRobots = "noindex, nofollow, noarchive"
# allowRobots = "index, follow"
# siteNoIndex = false
# noIndexPages = ["404 Page not found"]
# usesAnimation = true
# Optional social links
[[params.socialLinks]]
name = "mastodon"
url = "https://social.thesatelliteoflove.com/users/phil"
@@ -134,7 +57,6 @@ expiryDate = ["expiryDate"]
url = "https://bsky.app/profile/mrwhiskers.bsky.social"
[menu]
[[menu.main]]
name = "Posts"
url = "posts/"
@@ -143,4 +65,15 @@ expiryDate = ["expiryDate"]
[[menu.main]]
name = "About"
url = "about/"
weight = 20
weight = 20
[outputFormats.jsonfeed]
mediaType = "application/json"
baseName = "feed"
rel = "alternate"
isPlainText = true
[outputs]
home = ["html", "jsonfeed", "rss"]
section = ["html", "jsonfeed", "rss"]

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
{"Target":"/ananke/css/main.min.css","MediaType":"text/css","Data":{}}

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
{"Target":"css/style.min.b76ead157e389aea5cb7034b075218ad50e5d36d55d53c29fbdd1358ef8e4629.css","MediaType":"text/css","Data":{"Integrity":"sha256-t26tFX44mupctwNLB1IYrVDl021V1Twp+90TWO+ORik="}}

0
static/feeds/.index Normal file
View File

Binary file not shown.

After

Width:  |  Height:  |  Size: 419 KiB

Submodule themes/hermit-v2 deleted from 881a5b145d