Skip to content
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
2 changes: 1 addition & 1 deletion .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ jobs:
name: "Publish Site"
runs-on: ubuntu-latest
needs: [Setup, BuildSite]
if: ${{ success() }}
if: ${{ false }}
outputs:
static_web_app_url: ${{ steps.azureDeploy.outputs.static_web_app_url }}
steps:
Expand Down
20 changes: 20 additions & 0 deletions module/layouts/_partials/components/seo/guide-version-links.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,26 @@
{{- end -}}
{{- end -}}

{{- /* Add hreflang links for all available languages of this version */ -}}
{{- range .Site.Sites -}}
{{- $langCode := .Language.Lang -}}
{{- $siteVersion := "" -}}

{{- /* Try to find the equivalent page in this language site */ -}}
{{- $versionPath := printf "%s/%s" $.Section $currentVersion -}}
{{- $langVersionPage := .GetPage $versionPath -}}

{{- /* If specific version not found and this is latest, try section root */ -}}
{{- if and (not $langVersionPage) (eq $currentVersion $latestVersion) -}}
{{- $langVersionPage = .GetPage $.Section -}}
{{- end -}}

{{- /* Add hreflang link if page exists in this language */ -}}
{{- if $langVersionPage -}}
<link rel="alternate" hreflang="{{ $langCode }}" href="{{ $.Site.Params.siteProdUrl }}{{ $langVersionPage.RelPermalink }}" />
{{- end -}}
{{- end -}}

{{- /* Add "latest" rel link if this is not the latest version */ -}}
{{- if ne $currentVersion $latestVersion -}}
{{- $sectionPage := $.Site.GetPage $.Section -}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

{{- /* Robots meta tag for non-latest versions */ -}}
{{- if and $isGuide $currentVersion (not $isLatestVersion) -}}
<meta name="robots" content="noindex, follow" />
<meta name="robots" content="index, follow" />
<meta name="description" content="Historical version ({{ $currentVersion }}) of {{ .Title }}. For the latest version, visit the main guide page." />
{{- end -}}

Expand Down
15 changes: 6 additions & 9 deletions module/layouts/_partials/functions/get-canonical-url.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,12 @@
{{- if eq .Type "guide" -}}
{{- $currentVersion := partial "functions/get-guide-version.html" . -}}
{{- if $currentVersion -}}
{{- $latestVersion := partial "functions/get-latest-version" . -}}
{{- if eq $currentVersion $latestVersion -}}
{{- /* For latest version, canonical should be the section root */ -}}
{{- $sectionPage := .Site.GetPage .Section -}}
{{- if $sectionPage -}}
{{- $canonicalUrl = $sectionPage.RelPermalink -}}
{{- else -}}
{{- $canonicalUrl = printf "/%s/" .Section -}}
{{- end -}}
{{- /* For ALL guide versions, canonical should be the section root */ -}}
{{- $sectionPage := .Site.GetPage .Section -}}
{{- if $sectionPage -}}
{{- $canonicalUrl = $sectionPage.RelPermalink -}}
{{- else -}}
{{- $canonicalUrl = printf "/%s/" .Section -}}
{{- end -}}
{{- end -}}
{{- end -}}
Expand Down
4 changes: 2 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Scrum Guides Expansion Pack
# Hugo Guides - Open Extension

This repository contains an expansion pack for the Scrum Guide, providing additional resources, examples, and explanations to enhance understanding of Scrum practices.
This repository provides an engine for guides in Hugo.