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

Compare commits

..

No commits in common. "6070431bbcdda404e4970096dc69c3ba2cf1e43c" and "4bf85b23c6f516982780df8e4533bf24881900c7" have entirely different histories.

6 changed files with 13 additions and 9 deletions

1
.gitignore vendored
View file

@ -19,4 +19,3 @@ public.eac
styles/ styles/
.vale.ini .vale.ini
.webmentiond-token .webmentiond-token
data/*.json

View file

@ -26,6 +26,7 @@ csv/webrings.csv:
hugo: csv/webrings.csv $(SRCFILES) hugo: csv/webrings.csv $(SRCFILES)
sh scripts/get-token.sh sh scripts/get-token.sh
hugo -b $(HUGO_BASEURL) $(HUGO_FLAGS) -d $(OUTPUT_DIR) hugo -b $(HUGO_BASEURL) $(HUGO_FLAGS) -d $(OUTPUT_DIR)
rm .webmentiond-token
mv $(OUTPUT_DIR)/about/_index.gmi $(OUTPUT_DIR)/about/index.gmi mv $(OUTPUT_DIR)/about/_index.gmi $(OUTPUT_DIR)/about/index.gmi
# .hintrc-local for linting local files # .hintrc-local for linting local files
@ -38,7 +39,7 @@ hugo: csv/webrings.csv $(SRCFILES)
.PHONY: clean .PHONY: clean
clean: clean:
rm -rf $(OUTPUT_DIR) .lighthouseci lighthouse-reports mentions.json data/webmentions.json rm -rf $(OUTPUT_DIR) .lighthouseci lighthouse-reports mentions.json
.PHONY: lint-css .PHONY: lint-css
lint-css: $(CSS_DIR)/*.css lint-css: $(CSS_DIR)/*.css

View file

@ -6,9 +6,6 @@ replyTitle: "I run Lighthouse and WAVE as…a baseline of sorts"
replyType: "SocialMediaPosting" replyType: "SocialMediaPosting"
replyAuthor: "Todd Libby" replyAuthor: "Todd Libby"
replyAuthorURI: "https://toddl.dev/" replyAuthorURI: "https://toddl.dev/"
syndicatedCopies:
- title: 'The Fediverse'
url: 'https://pleroma.envs.net/notice/AQs97KWObcsL5o0flw'
--- ---
> I run Lighthouse and WAVE as a "Hey, let's see what I have ahead of me" kind of thing. A baseline of sorts. Then I go into manual testing > I run Lighthouse and WAVE as a "Hey, let's see what I have ahead of me" kind of thing. A baseline of sorts. Then I go into manual testing

View file

@ -7,7 +7,13 @@
<p>This site supports <a href="https://indieweb.org/webmention">Webmentions</a>, a backlink-based alternative to traditional comment forms.</p> <p>This site supports <a href="https://indieweb.org/webmention">Webmentions</a>, a backlink-based alternative to traditional comment forms.</p>
{{ partial "webmention-form.html" . }} {{ partial "webmention-form.html" . }}
{{- /* Fetch all webmentions with bearer token */ -}} {{- /* Fetch all webmentions with bearer token */ -}}
{{- $allMentions := (index .Site.Data "webmentions").items -}} {{ $bearer_token := "" }}
{{- with readFile ".webmentiond-token" -}}
{{- $auth := printf "Bearer %s" . -}}
{{- $bearer_token = dict "Authorization" $auth -}}
{{- end -}}
{{- $mentionsURL := "https://seirdy.one/webmentions/manage/mentions?limit=9999&status=approved" -}}
{{- $allMentions := (getJSON $mentionsURL $bearer_token).items -}}
{{- /* Filter webmentions to just the ones for the current targets */ -}} {{- /* Filter webmentions to just the ones for the current targets */ -}}
{{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" -}} {{- $canonicalRelPermalink := .RelPermalink | replaceRE "^/~seirdy/" "/" -}}
{{- $target := printf "%s%s" .Site.Params.CanonicalBaseURL $canonicalRelPermalink -}} {{- $target := printf "%s%s" .Site.Params.CanonicalBaseURL $canonicalRelPermalink -}}

View file

@ -18,7 +18,9 @@ key="$(_key)"
set -u set -u
# just a lil curl wrapper I use on seirdy.one # just a lil curl wrapper I use on seirdy.one
alias ccurl='curl --proto "=https" --proto-default https --tlsv1.3 --cert-status --compressed' ccurl() {
curl --proto "=https" --proto-default https --tlsv1.3 --cert-status --compressed $*
}
_token() { _token() {
ccurl -sX POST https://seirdy.one/webmentions/authenticate/access-key -d "key=$key" ccurl -sX POST https://seirdy.one/webmentions/authenticate/access-key -d "key=$key"
@ -27,5 +29,4 @@ _token() {
token="$(_token)" token="$(_token)"
set +u set +u
ccurl -H "Authorization: Bearer $token" 'https://seirdy.one/webmentions/manage/mentions?limit=9999&status=approved' >data/webmentions.json printf '%s' "$token" >.webmentiond-token
# printf '%s' "$token" >.webmentiond-token