Use proper canonical links

This commit is contained in:
JP Hastings-Spital 2023-08-10 08:39:10 +01:00
parent db7f50f33b
commit e2fc502e89
3 changed files with 3 additions and 12 deletions

View file

@ -51,9 +51,8 @@ jobs:
run: |
hugo \
--cacheDir /tmp/hugo/cache \
--minify
# Don't force a base URL, so relative links work everywhere
# --baseURL "${{ steps.pages.outputs.base_url }}/"
--minify \
--baseURL "https://www.byjp.me"
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:

View file

@ -4,12 +4,6 @@ theme = "hello-friend-ng"
PygmentsCodeFences = true
PygmentsStyle = "monokai"
# googleAnalytics = ""
# disqusShortname = ""
canonifyURLs = true
relativeURLs = true
enableRobotsTXT = true
enableGitInfo = true
enableEmoji = true

View file

@ -4,7 +4,6 @@
<meta name="author" content="{{ if .Params.author }}{{ .Params.author }}{{ else }}{{ range .Site.Author }}{{ . }} {{ end }}{{ end }}">
<meta name="description" content="{{ if .IsHome }}{{ .Site.Params.homeSubtitle }}{{ else }}{{ if .Params.Description }}{{ .Params.Description }}{{ else }}{{ .Summary | plainify }}{{ end }}{{ end }}" class="p-summary"/>
<meta name="keywords" content="{{ .Site.Params.keywords }}{{ if .Params.tags }}{{ range .Params.tags }}, {{ . }}{{ end }}{{ end }}" />
<meta name="robots" content="noodp" />
<meta name="theme-color" content="{{ .Site.Params.themeColor }}" />
<link rel="canonical" href="{{ .Permalink }}" class="u-url"/>
@ -12,7 +11,6 @@
<link rel="authorization_endpoint" href="https://indieauth.com/auth" />
<link rel="token_endpoint" href="https://tokens.indieauth.com/token" />
<link rel="webmention" href="https://webmention.io/www.byjp.me/webmention" />
<link rel="microsub" href="https://aperture.p3k.io/microsub/884" />
{{ block "title" . }}
<title>
@ -29,7 +27,7 @@
{{ $options := (dict "targetPath" "main.css" "outputStyle" "compressed" "enableSourceMap" true) }}
{{ $style := resources.Get "scss/main.scss" | resources.ToCSS $options | resources.Fingerprint }}
<link rel="stylesheet" href="{{ $style.RelPermalink | absURL }}">
<link rel="stylesheet" href="{{ $style.RelPermalink }}">
{{ range $val := $.Site.Params.customCSS }}
{{ if gt (len $val) 0 }}