1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-23 12:52:10 +00:00

Compare commits

...

2 commits

Author SHA1 Message Date
Rohan Kumar
3b8b35ce8c
Fix: get webmentions from legacy URLs 2022-05-27 19:21:43 -07:00
Rohan Kumar
6c35495511
Remove RSS feed from main menu
Posts and Notes feeds are linked by their respective pages.
2022-05-27 17:59:44 -07:00
2 changed files with 4 additions and 9 deletions

View file

@ -69,13 +69,6 @@ disableKinds = ["taxonomy", "term"]
url = "/resume/" url = "/resume/"
weight = 40 weight = 40
[[menu.main]]
identifier = "rss"
name = "RSS feed"
title = "rss feed"
url = "/posts/index.xml"
weight = 50
[permalinks] [permalinks]
posts = "/posts/:year/:month/:day/:filename" posts = "/posts/:year/:month/:day/:filename"
notes = "/notes/:year/:month/:day/:filename" notes = "/notes/:year/:month/:day/:filename"

View file

@ -3,8 +3,10 @@
<p>This site supports <a href="https://indieweb.org/webmention">Webmentions</a>. Webmentions received for this post will appear in the following list after I approve them. I sometimes send Webmentions to myself on behalf of linking sites that don't support them. Check the <a href="https://web.archive.org/">Wayback Machine</a> if any links are broken.</p> <p>This site supports <a href="https://indieweb.org/webmention">Webmentions</a>. Webmentions received for this post will appear in the following list after I approve them. I sometimes send Webmentions to myself on behalf of linking sites that don't support them. Check the <a href="https://web.archive.org/">Wayback Machine</a> if any links are broken.</p>
<dl> <dl>
{{- $target := .RelPermalink | replaceRE "^/~seirdy/" "/" }} {{- $target := .RelPermalink | replaceRE "^/~seirdy/" "/" }}
{{ $url := printf "https://seirdy.one/webmentions/get?status=approved&target=https://seirdy.one%s" $target -}} {{- $oldTarget := $target | replaceRE "/posts" "" | replaceRE "/$" ".html" -}}
{{ $webmentions := getJSON $url -}} {{ $url1 := printf "https://seirdy.one/webmentions/get?status=approved&target=https://seirdy.one%s" $target -}}
{{ $url2 := printf "https://seirdy.one/webmentions/get?status=approved&target=https://seirdy.one%s" $oldTarget -}}
{{ $webmentions := (getJSON $url1) | append (getJSON $url2) -}}
{{ range $webmentions -}} {{ range $webmentions -}}
{{ $webmention := . -}} {{ $webmention := . -}}
{{ if (eq $webmention.type "like") -}} {{ if (eq $webmention.type "like") -}}