Compare commits

...

6 Commits

Author SHA1 Message Date
hedy 5cdf520b32
update readme 2024-04-08 21:35:02 +08:00
hedy 94678da810
Misc updates on phrasing for post meta information
- Posted "on"
- Last updated "on"
- Tags:/Tag: -> Tagged
- Use configurable author email everywhere
2024-04-08 21:31:24 +08:00
hedy 2b58f28c95
Add an RSS SVG icon which I will not use right now 2024-04-08 21:31:10 +08:00
hedy 2e177f873f
feat: Support gemini posts listing `posts/index.gmi` 2024-04-08 21:19:40 +08:00
hedy 77a63d9637
Gemini post: update wording 2024-04-08 21:12:54 +08:00
hedy aa22cf0952
Fix typos and make make(1) less verbose 2024-04-08 20:30:45 +08:00
19 changed files with 72 additions and 56 deletions

View File

@ -3,7 +3,7 @@ HUGO_CACHEDIR=~/hugo_cache
HUGO_FLAGS=--cleanDestinationDir
RSYNC=rsync
RSYNC_FLAGS=-av
RSYNC_FLAGS=-a
HUT=hut
@ -46,20 +46,22 @@ gemini:
$(RSYNC) $(RSYNC_FLAGS) $(GEMINI_DEST) $(GEMINI_DEST)-back --delete
$(RSYNC) $(RSYNC_FLAGS) public/*.gmi public/posts/*.gmi public/gemini/ $(GEMINI_DEST)/ --exclude _index.gmi
$(RSYNC) $(RSYNC_FLAGS) public/posts/gemini/index.xml $(GEMINI_DEST)/feed.xml
$(RSYNC) $(RSYNC_FLAGS) public/posts/gemini/index.gmi $(GEMINI_DEST)/posts/index.gmi
gemini-clean:
# This is the target that has caused me the most trouble, literally lost my
# entire public_gemini from this when I had a bug here.
# So PLEASE PLEASE PLEASE make sure to run make all (or make backup
# manually) before using this!
#
# Remove copied post files
@# This is the target that has caused me the most trouble, literally lost my
@# entire public_gemini from this when I had a bug here.
@# So PLEASE PLEASE PLEASE make sure to run make all (or make backup
@# manually) before using this!
@#
@# Remove copied post files
find $(GEMINI_DEST) -wholename '*/$(GEMINI_DEST_BASE)/posts/????-??-??-*.gmi' -delete
find $(GEMINI_DEST) -wholename '*/$(GEMINI_DEST_BASE)/????-??-??-*.gmi' -delete
# Use ugly urls, find the dirs that only contains a single 'index.gmi',
# excluding the root index.gmi
@# Use ugly urls, find the dirs that only contains a single 'index.gmi',
@# excluding the root index.gmi
find $(GEMINI_DEST) -wholename '*/index.gmi' -not -wholename '$(UGLYURL_EXCLUDE)' -not -wholename '*/posts/index.gmi' -not -wholename '*/$(GEMINI_DEST_BASE)/index.gmi' -exec echo '{}' \; > out.txt
# Copy /blah/index.gmi to blah.gmi then rm /blah/
while read line; do \
@# Copy /blah/index.gmi to blah.gmi then rm /blah/
@while read line; do \
dest=$$( echo $$line | sed 's_/index.gmi$$_.gmi_'); \
dir=$$( echo $$line | sed 's_/index.gmi$$__'); \
echo Syncing and removing $$(basename $$dir); \
@ -67,16 +69,18 @@ gemini-clean:
rm -rf $$dir; \
done < out.txt; \
rm out.txt
echo done
@echo done
html:
$(RSYNC) $(RSYNC_FLAGS) public/ --exclude '*.gmi' --exclude gemini $(HTML_DEST)
# Manually include gemini tag (because it was excluded above)
@# Manually include gemini tag (because it was excluded above)
$(RSYNC) $(RSYNC_FLAGS) public/tags/gemini $(HTML_DEST)/tags/
finish-clean:
rm -rf $(GEMINI_DEST)-back $(HTML_DEST)-back
gen-gemini: backup gen gemini gemini-clean
gen-html: backup gen html
all: backup gen gemini html gemini-clean
full: nonsymlink-clean backup gen gemini html gemini-clean

View File

@ -22,16 +22,10 @@ css](https://simplecss.org) and sometimes [seirdy's site](https://seirdy.one).
## todo
- [ ] let gemini version also have a post page at /posts/index.gmi
- [x] let gemini version also have a post page at /posts/index.gmi
- [ ] minify images and use WebP
- [x] provide atom feed for www
- [x] show post description in list
- [ ] content improvements
- [ ] about
- [ ] projects
- [ ] syntax hilite post
- [ ] gemini post
- [ ] proper reply via email link
## writing
@ -42,7 +36,7 @@ bin/post
## deploy
Also see [gemcgi](../gemcgi)
Also see [gemcgi](https://git.sr.ht/~hedy/gemcgi)
```sh
make all deploy

3
assets/rss.svg Normal file
View File

@ -0,0 +1,3 @@
<svg height="1024" width="768" xmlns="http://www.w3.org/2000/svg">
<path d="M128 640C57.344 640 0 697.375 0 768s57.344 128 128 128 128-57.375 128-128S198.656 640 128 640zM128 384c0 0-64 2-64 64s64 64 64 64c141.375 0 256 114.625 256 256 0 0 0 64 64 64s64-64 64-64C512 556 340.031 384 128 384zM128 128c0 0-64 0-64 64s64 64 64 64c282.75 0 512 229.25 512 512 0 0 0 64 64 64s64-64 64-64C768 414.594 481.5 128 128 128z" />
</svg>

After

Width:  |  Height:  |  Size: 426 B

View File

@ -15,15 +15,15 @@ thoughts.
## Pages
=> /posts/ gemlog
=> about.gmi about.gmi (and methods of contact)
=> misc.gmi misc.gmi
=> //do.hedy.dev/pgp.asc PGP public key
=> //do.hedy.dev/sshkey.txt SSH public key
=> //do.hedy.dev/tinylog.gmi tinylog.gmi
=> //do.hedy.dev/tw.txt twtxt feed
=> misc.gmi misc.gmi
## Services

View File

@ -1,4 +1,5 @@
---
title: home
outputs:
- html
- gemtext

View File

@ -27,7 +27,7 @@ Excuse the odd placing of this post, but otherwise, enjoy the read~
<summary>2024 March Update</summary>
I no longer host my website, gemini capsule and spartan content on tilde.cafe.
As of writing, I've switched to srht.site for static HTTPS+GEMINI hosting and
As of writing, I've switched to srht.site for static HTTPS/gemini hosting with
my own domain at home.hedy.dev.
I'm keeping this post (which as it turns out, I still never got to publish) as

View File

@ -48,9 +48,8 @@ At the end of the day, the fact that I create and browse content in Geminispace
> I'm not here because I hate the web, I'm here because I like Gemini.
=> gemini://station.martinrue.com/mozz/d29f6cf900b04aef9e7a2332c2098f13 (source)
You don't have to ditch the web to use Gemini. You get to choose what you write about, but you don't get to choose the color of your headers, or the font size of your body paragraphs. Go use the web if you want that.
You don't have to ditch the web to use Gemini. You get to choose what you write about, but you don't get to choose the color of your headers, or the font size of your body paragraphs. You are free to use the web if you want that.
---
## Full list of references
=> https://lobste.rs/s/vhlagb/why_gemini_is_not_my_favorite_internet Why Gemini is Not My Favorite Internet Protocol (Lobste.rs)

View File

@ -69,7 +69,7 @@ At the end of the day, the fact that I create and browse content in Geminispace
> I'm not here because I hate the web, I'm here because I like Gemini.
> ([source](gemini://station.martinrue.com/mozz/d29f6cf900b04aef9e7a2332c2098f13))
You don't have to ditch the web to use Gemini. You get to choose what you write about, but you don't get to choose the color of your headers, or the font size of your body paragraphs. Go use the web if you want that.
You don't have to ditch the web to use Gemini. You get to choose what you write about, but you don't get to choose the color of your headers, or the font size of your body paragraphs. You are free to use the web if you want that.
## Full list of references
* [Why Gemini is Not My Favorite Internet Protocol (Lobste.rs)](https://lobste.rs/s/vhlagb/why_gemini_is_not_my_favorite_internet)

5
content/posts/_index.gmi Normal file
View File

@ -0,0 +1,5 @@
These are my long-form musings. I aim to write at least twice a year, but over the past two years I have clearly failed in this aspect. I'll try to write more often.
Comments can be sent to my public mailing list where I'll also send new posts (after 2023) as plain text to. If you subscribe to the list, it acts like a newsletter where you'll receive new posts from your inbox. Posting and subscribing happen solely through emails. No external auth required.
=> mailto:~hedy.posts@lists.sr.ht

View File

@ -1,5 +1,10 @@
---
title: Posts
outputs:
- html
- gemtext
- gematom
- rss
---

View File

@ -1,5 +1,4 @@
{{ block "content" . -}}{{ end }}
{{- block "content" . }}{{ end }}
=> {{.Site.Params.src}} Source
{{- with .OutputFormats.Get "html" }}
{{- $weburl := .Permalink }}

View File

@ -0,0 +1,4 @@
{{ define "content" -}}
{{ partial "posts.gmi" . }}
--
{{- end }}

View File

@ -1,4 +1,5 @@
{{ define "content" -}}
# {{ .Title }}
{{ $lastmod := .Lastmod -}}
@ -9,5 +10,5 @@ Last updated {{ .Lastmod.Format "2006-01-02" }}{{ end }}
{{ trim (readFile (replace $.File.Path ".md" ".gmi")) "\n" | safeHTML }}
--
=> {{ replace .Site.BaseURL "https:" "" }} Home
=> {{ replace .Site.BaseURL "https:" "gemini:" }} Home
{{- end }}

View File

@ -1,13 +1,7 @@
{{ define "content" }}
{{readFile (replace (replace $.File.Path ".md" ".gmi") ".html" ".gmi") | safeHTML}}
{{ define "content" -}}
{{ readFile (replace (replace $.File.Path ".md" ".gmi") ".html" ".gmi") | safeHTML }}
## Gemlog posts
=> feed.xml atom feed
{{ range (where .Site.RegularPages "Section" "posts") }}
{{- if .OutputFormats.Get "gemtext" }}
=> {{replace (replace .RelPermalink "/gemini" "" 1) "/index.gmi" ".gmi" 1}} {{ .Date.Format "2006-01-02" }}: {{.Title | safeHTML}}{{ end }}{{ end }}
{{ partial "posts.gmi" . }}
--
{{- end }}

View File

@ -1,5 +1,5 @@
{{ if lt .Date .Lastmod -}}
&nbsp;|&nbsp;
Last updated:
Last updated on
<time itemprop="dateModified" class="dt-updated">{{ .Lastmod.Format "2006-01-02" }}</time>
{{- end -}}

View File

@ -0,0 +1,13 @@
{{ if hasPrefix .File.Path "posts" -}}
# Gemlog
{{- else -}}
## Gemlog posts
{{- end }}
{{ trim (readFile (replace (.Site.GetPage "posts").File.Path ".md" ".gmi")) "\n" | safeHTML }}
--
=> /feed.xml Atom feed
{{ range (where .Site.RegularPages "Section" "posts") }}
{{- if .OutputFormats.Get "gemtext" }}
=> {{replace (replace .RelPermalink "/gemini" "" 1) "/index.gmi" ".gmi" 1}} {{ .Date.Format "2006-01-02" }}: {{.Title | safeHTML}}{{ end }}{{- end }}

View File

@ -1,12 +1,7 @@
{{ $taxonomy := "tags" -}}
{{ with .Param $taxonomy -}}
{{- if gt (len .) 1 -}}
&nbsp;|&nbsp;
Tags:
{{- else if gt (len .) 0 -}}
&nbsp;|&nbsp;
Tag:
{{- end }}
Tagged
{{ range $index, $tag := . -}}{{- with $.Site.GetPage (printf "/%s/%s" $taxonomy $tag) -}}
{{- if $index -}}, {{ end -}}<a href="{{ .RelPermalink }}">{{ $tag | urlize }}</a>{{- end -}}{{- end }}
{{- end -}}

View File

@ -1,5 +1,5 @@
{{ define "content" }}
# {{$.Title}}
{{ define "content" -}}
# {{ $.Title }}
Posted {{ .Date.Format "2006-01-02" }}
{{ $lastmod := .Lastmod -}}
@ -21,11 +21,10 @@ Tag:
{{ trim (readFile (replace $.File.Path ".md" ".gmi")) "\n" | safeHTML }}
--
Questions/comments:
=> mailto:~hedy/posts@lists.sr.ht Public gemlog mailing list (plain-text only)
=> mailto:{{ .Site.Author.Email }} Or email me directly
=> mailto:{{ .Site.Author.email }} Or email me directly
=> .. Home
{{- end }}

View File

@ -1,4 +1,4 @@
{{ define "main" }}
{{ define "main" -}}
<div itemscope itemtype="https://schema.org/BlogPosting" class="h-entry">
<article itemprop="mainEntityOfPage">
<header id="post-header">
@ -7,8 +7,8 @@
<div class="post-description"><p><em>{{ . }}</em></p></div>
{{- end }}
<div class="post-meta">
<p>
<time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time>
<p>Posted on
<time itemprop="datePublished" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "2006-01-02" }}</time>
{{ partial "tags.html" . }}
{{ partial "lastmod.html" . }}
&nbsp;|&nbsp;
@ -22,7 +22,7 @@
</section>
</article>
</div>
{{ end }}
{{- end }}
{{- define "after" }}
<p id="#EOF">EOF</p>
<section class="comments">
@ -30,7 +30,7 @@
Questions, comments? Send an email to my
<a href="mailto:~hedy/posts@lists.sr.ht">blog-post mailing list</a>
(with <a href="https://useplaintext.email">plain text</a>)
or to me <a href="mailto:hedy@tilde.cafe">directly</a>.
or to me <a href="mailto:{{ .Site.Author.email }}">directly</a>.
</p>
</section>
{{- end }}