Made webmention portion of code more generic

This commit is contained in:
Brandon Rozek 2022-11-25 23:22:28 -05:00
parent 4d5f0f30cb
commit a574a122a4
4 changed files with 7 additions and 9 deletions

View file

@ -5,11 +5,6 @@
<link rel="canonical" href="{{ .Permalink }}"> <link rel="canonical" href="{{ .Permalink }}">
<meta name="robots" content="noindex"> <meta name="robots" content="noindex">
<meta charset="utf-8"> <meta charset="utf-8">
<!-- Webmentions -->
<link rel="webmention" href="https://webmention.io/brandonrozek.com/webmention" />
<link rel="pingback" href="https://webmention.io/brandonrozek.com/xmlrpc" />
<meta http-equiv="refresh" content="0; url={{ .Permalink }}"> <meta http-equiv="refresh" content="0; url={{ .Permalink }}">
</head> </head>
<body> <body>

View file

@ -14,7 +14,7 @@
</div> </div>
<!-- author --> <!-- author -->
<h1 class="author title p-name">{{ .Site.Params.Author }}</h1> <h1 class="author title p-name">{{ .Site.Params.Author }}</h1>
<a style="display: none" rel="me" class="u-url" href="https://brandonrozek.com"></a> <a style="display: none" rel="me" class="u-url" href="{{ .Site.BaseURL }}"></a>
<!-- description --> <!-- description -->
<p class="p-note"> <p class="p-note">
{{ .Site.Params.description | safeHTML }} {{ .Site.Params.description | safeHTML }}

View file

@ -14,6 +14,7 @@
<meta name="author" content="{{ .Site.Params.Author }}" /> <meta name="author" content="{{ .Site.Params.Author }}" />
<meta name="robots" content="index,follow" /> <meta name="robots" content="index,follow" />
<link rel="manifest" href="/manifest.json" /> <link rel="manifest" href="/manifest.json" />
<link rel="hub" href="https://pubsubhubbub.superfeedr.com/"/>
<link rel="shortcut icon" type="image/x-icon" href="{{ .Site.BaseURL }}{{ .Site.Params.favicon }}"> <link rel="shortcut icon" type="image/x-icon" href="{{ .Site.BaseURL }}{{ .Site.Params.favicon }}">
<!-- Identities --> <!-- Identities -->
@ -22,8 +23,9 @@
{{ end -}} {{ end -}}
<!-- Webmentions --> <!-- Webmentions -->
<link rel="webmention" href="https://webmention.io/brandonrozek.com/webmention" /> {{ $siteHost := (urls.Parse .Site.BaseURL).Host -}}
<link rel="pingback" href="https://webmention.io/brandonrozek.com/xmlrpc" /> <link rel="webmention" href="https://webmention.io/{{ $siteHost }}/webmention" />
<link rel="pingback" href="https://webmention.io/{{ $siteHost }}/xmlrpc" />
<!-- RSS / Alternative Links --> <!-- RSS / Alternative Links -->
{{- if .IsHome -}} {{- if .IsHome -}}

View file

@ -1,6 +1,7 @@
<!-- Webmentions --> <!-- Webmentions -->
<div id="webmentions"></div> <div id="webmentions"></div>
<form method="post" action="https://webmention.io/brandonrozek.com/webmention"> {{ $siteHost := (urls.Parse .Site.BaseURL).Host -}}
<form method="post" action="https://webmention.io/{{ $siteHost }}/webmention">
<p>Have you published a response to this? <label for="webmention-source">Let me know the <abbr title="Uniform Resource Locator">URL</abbr></label>:</p> <p>Have you published a response to this? <label for="webmention-source">Let me know the <abbr title="Uniform Resource Locator">URL</abbr></label>:</p>
<input type="url" name="source" id="webmention-source"> <input type="url" name="source" id="webmention-source">
<input type="hidden" name="target" value="{{ .Permalink }}"> <input type="hidden" name="target" value="{{ .Permalink }}">