Skip to content
This repository has been archived by the owner on Dec 28, 2023. It is now read-only.

Move-more-functionality-to-addon-module #45

Merged
merged 4 commits into from
Oct 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion SCRATCHPAD-WISHLIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,12 @@ without needing to replace all CSS).
* Valid HTML5 / CSS3 (updated as browsers gain support for features)
* Canonical or not appropriately
* Index / follow or not appropriately
* Robots.txt with pointer to sitemap.xml
* TODO: Robots.txt with pointer to sitemap.xml

## 404

Basic 404 page (just the error message "404 Not Found" in the style of the
site).

## Mobile

Expand Down
4 changes: 2 additions & 2 deletions layouts/404.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{ define "main-content" }}
{{- if templates.Exists "partials/output-wtg-awt/layout-404.html" }}
{{ partial "output-wtg-awt/layout-404.html" . -}}
{{- if templates.Exists "partials/wtg-theme/output/layout-404.html" }}
{{ partial "wtg-theme/output/layout-404.html" . -}}
{{- else }}
<p>404 Page not found</p>
{{- end -}}
Expand Down
9 changes: 0 additions & 9 deletions layouts/partials/wtg-shell/output/head-canonical.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,4 @@
{{ (printf "<!-- link rel=\"alternate\" data=\"will-not-be-canonical\" href=\"%s\" -->" .Permalink) | safeHTML -}}
{{- end -}}
{{- end -}}
{{- if .IsTranslated -}}
{{- range .Translations }}
<link rel="alternate" hreflang="{{ .Language.Lang }}" href="{{ .Permalink }}">
{{- end }}
<link rel="alternate" hreflang="{{ .Language.Lang }}" href="{{ .Permalink }}">
{{- with .Sites.First.GetPage (.TranslationKey | strings.TrimPrefix (.Page.Kind | lower) | strings.TrimPrefix "/") }}
<link rel="alternate" hreflang="x-default" href="{{ .Permalink }}">
{{- end -}}
{{- end -}}
{{- /* Remove trailing newlines */ -}}
13 changes: 1 addition & 12 deletions layouts/partials/wtg-shell/output/page-header-nav.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,8 @@
<menu>
<li><a href="{{ relref .Page "/" }}">{{ site.Title }}</a></li>
</menu>
{{- /* Next header piece is/are links to translations of this page */ -}}
{{- if .IsTranslated }}
<details>
<summary>A↔B</summary>
<div>
{{- range .Translations }}
<span><a href="{{ .RelPermalink }}">{{ with .Language.LanguageName }}{{ . }}{{ else }}{{ .Lang }}{{ end }}</a></span>
{{- end }}
</div>
</details>
{{- else -}}
{{- /* Next header piece placeholder for language selector */ -}}
<div></div>
{{- end }}
{{- /* Next header piece is/are menu items, if a 'main' menu is defined */}}
<menu>
{{- with site.Menus.main -}}
Expand Down
16 changes: 1 addition & 15 deletions layouts/partials/wtg-shell/output/sitemap-urls.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- /* cspell:ignore pagecanonical taxcanonical changefreq hreflang */ -}}
{{- /* cspell:ignore pagecanonical taxcanonical changefreq */ -}}
{{ range .Data.Pages }}
{{- $pageCanonical := true -}}
{{- if isset .Page.Params "pagecanonical" -}}
Expand All @@ -24,20 +24,6 @@
{{- if ge .Sitemap.Priority 0.0 }}
<priority>{{ .Sitemap.Priority }}</priority>
{{- end -}}
{{- if .IsTranslated }}
{{- range .Translations }}
<xhtml:link
rel="alternate"
hreflang="{{ .Language.Lang }}"
href="{{ .Permalink }}"
/>
{{- end }}
<xhtml:link
rel="alternate"
hreflang="{{ .Language.Lang }}"
href="{{ .Permalink }}"
/>
{{- end }}
</url>
{{- end -}}
{{- end -}}