diff --git a/layouts/docs/baseof.html b/layouts/docs/baseof.html
index 654733abf33..68c4f4b77ff 100644
--- a/layouts/docs/baseof.html
+++ b/layouts/docs/baseof.html
@@ -1,5 +1,5 @@
-
+
{{ partial "head.html" . }}
@@ -8,51 +8,44 @@
{{ partial "navbar.html" . }}
{{ partial "announcement.html" . }}
{{ block "hero" . }}
-
{{ end }}
diff --git a/layouts/docs/content.html b/layouts/docs/content.html
new file mode 100644
index 00000000000..7c4bdcaf963
--- /dev/null
+++ b/layouts/docs/content.html
@@ -0,0 +1,25 @@
+
+ {{- if .HasShortcode "kat-button" -}}
+
+ {{ T "katacoda_message" | safeHTML }}
+
+ {{- end -}}
+
{{ .Title }}
+ {{ with .Params.description }}
{{ . | markdownify }}
{{ end }}
+
+ {{ partial "taxonomy_terms_article_wrapper.html" . }}
+ {{ if (and (not .Params.hide_readingtime) (.Site.Params.ui.readingtime.enable)) }}
+ {{ partial "reading-time.html" . }}
+ {{ end }}
+
+ {{ .Content }}
+ {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.Config.Services.GoogleAnalytics.ID)) }}
+ {{ partial "feedback.html" .Site.Params.ui.feedback }}
+
+ {{ end }}
+ {{ if (.Site.Config.Services.Disqus.Shortname) }}
+
+ {{ partial "disqus-comment.html" . }}
+ {{ end }}
+ {{ partial "page-meta-lastmod.html" . }}
+
diff --git a/layouts/docs/list.html b/layouts/docs/list.html
index cc10537a766..834e59c9baf 100644
--- a/layouts/docs/list.html
+++ b/layouts/docs/list.html
@@ -1,45 +1,27 @@
+{{/*
+Copied from Docsy with the modification of .Site.Config.Services.GoogleAnalytics and .Site.Config.Services.Disqus as
+the existing .Site.GoogleAnalytics and .Site.DisqusShortname are no longer supported.
+*/}}
{{ define "main" }}
-{{- $child_of_first_section := false -}}
-{{- with .Parent -}}
-{{- if eq .CurrentSection .FirstSection -}}
-{{- $child_of_first_section = true -}}
-{{- end -}}
-{{- end -}}
-
- {{ $hasContent := false }}
- {{ with .File }}
- {{ if ne .Filename "" }}
- {{ $hasContent = (ge (len $.RawContent) 100) }}
- {{ end }}
- {{ end }}
- {{ if $hasContent }}
- {{- if $child_of_first_section -}}
- {{ partial "docs/top-section-page" (dict "ctx" $ "page" $ ) }}
- {{- else -}}
- {{ partial "docs/content-page" (dict "ctx" $ "page" $ ) }}
-
- {{ partial "docs/api-reference-links" $ }}
- {{- end -}}
- {{ else }}
-
{{ .Title }}
- {{ with .Params.description }}
{{ . | markdownify }}
{{ end }}
- {{ end }}
+
+
{{ .Title }}
+ {{ with .Params.description }}
{{ . | markdownify }}
{{ end }}
+
+ {{ partial "taxonomy_terms_article_wrapper.html" . }}
+ {{ if (and (not .Params.hide_readingtime) (.Site.Params.ui.readingtime.enable)) }}
+ {{ partial "reading-time.html" . }}
+ {{ end }}
+
+ {{ .Content }}
{{ partial "section-index.html" . }}
-
-{{ end }}
-{{ define "hero" }}
-{{- $child_of_first_section := false -}}
-{{- with .Parent -}}
-{{- if eq .CurrentSection .FirstSection -}}
-{{- $child_of_first_section = true -}}
-{{- end -}}
-{{- end -}}
-{{- if $child_of_first_section -}}
-
-{{- else -}}
-
-{{- end -}}
+ {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.Config.Services.GoogleAnalytics.ID)) }}
+ {{ partial "feedback.html" .Site.Params.ui.feedback }}
+
+ {{ end }}
+ {{ if (.Site.Config.Services.Disqus.Shortname) }}
+
+ {{ partial "disqus-comment.html" . }}
+ {{ end }}
+ {{ partial "page-meta-lastmod.html" . }}
+
{{ end }}
diff --git a/layouts/docs/single.html b/layouts/docs/single.html
deleted file mode 100644
index 8a7e19e9b61..00000000000
--- a/layouts/docs/single.html
+++ /dev/null
@@ -1,12 +0,0 @@
-{{ define "main" }}
-
- {{- if .HasShortcode "kat-button" -}}
-
- {{ T "katacoda_message" | safeHTML }}
-
- {{- end -}}
- {{ partial "docs/content-page" (dict "ctx" . "page" .) }}
-
- {{ partial "docs/api-reference-links" . }}
-
-{{ end }}
diff --git a/layouts/partials/page-meta-links.html b/layouts/partials/page-meta-links.html
index e0f94d275bd..5d5584d9bd3 100644
--- a/layouts/partials/page-meta-links.html
+++ b/layouts/partials/page-meta-links.html
@@ -1,27 +1,43 @@
{{/* template adapted from Docsy theme */}}
-{{ if .File.Path }}
- {{ $pathFormatted := replace .File.Path "\\" "/" }}
- {{ $gh_repo := ($.Param "github_repo") }}
- {{ $gh_subdir := ($.Param "github_subdir") }}
- {{ $gh_project_repo := ($.Param "github_project_repo") }}
- {{ $gh_branch := (default "main" ($.Param "github_branch")) }}
-
- {{ if $gh_repo }}
- {{ $gh_repo_path := printf "%s/content/%s" $gh_branch $pathFormatted }}
- {{ if and ($gh_subdir) (.Site.Language.Lang) }}
- {{ $gh_repo_path = printf "%s/%s/content/%s/%s" $gh_branch $gh_subdir ($.Site.Language.Lang) $pathFormatted }}
- {{ else if .Site.Language.Lang }}
- {{ $gh_repo_path = printf "%s/content/%s/%s" $gh_branch ($.Site.Language.Lang) $pathFormatted }}
- {{ else if $gh_subdir }}
- {{ $gh_repo_path = printf "%s/%s/content/%s" $gh_branch $gh_subdir $pathFormatted }}
- {{ end }}
- {{ $editURL := printf "%s/edit/%s" $gh_repo $gh_repo_path }}
- {{ $createURL := printf "%s/edit/%s" $gh_repo $gh_repo_path }}
- {{ $issuesURL := printf "%s/issues/new?title=%s" $gh_repo (htmlEscape $.Title )}}
- {{ $newPageStub := resources.Get "stubs/new-page-template.md" }}
- {{ $newPageQS := querify "value" $newPageStub.Content "filename" "change-me.md" | safeURL }}
- {{ $newPageURL := printf "%s/new/%s?%s" $gh_repo $gh_repo_path $newPageQS }}
+{{ if .File }}
+{{ $pathFormatted := replace .File.Path "\\" "/" -}}
+{{ $gh_repo := ($.Param "github_repo") -}}
+{{ $gh_url := ($.Param "github_url") -}}
+{{ $gh_subdir := ($.Param "github_subdir") -}}
+{{ $gh_project_repo := ($.Param "github_project_repo") -}}
+{{ $gh_branch := (default "main" ($.Param "github_branch")) -}}
+
+{{ if $gh_url -}}
+ {{ warnf "Warning: use of `github_url` is deprecated. For details see https://www.docsy.dev/docs/adding-content/repository-links/#github_url-optional" -}}
+
{{ T "post_edit_this" }}
+{{ else if $gh_repo -}}
+ {{ $gh_repo_path := printf "%s/content/%s" $gh_branch $pathFormatted -}}
+ {{ if and ($gh_subdir) (.Site.Language.Lang) -}}
+ {{ $gh_repo_path = printf "%s/%s/content/%s/%s" $gh_branch $gh_subdir ($.Site.Language.Lang) $pathFormatted -}}
+ {{ else if .Site.Language.Lang -}}
+ {{ $gh_repo_path = printf "%s/content/%s/%s" $gh_branch ($.Site.Language.Lang) $pathFormatted -}}
+ {{ else if $gh_subdir -}}
+ {{ $gh_repo_path = printf "%s/%s/content/%s" $gh_branch $gh_subdir $pathFormatted -}}
+ {{ end -}}
+
+ {{/* Adjust $gh_repo_path based on path_base_for_github_subdir */ -}}
+ {{ $ghs_base := $.Param "path_base_for_github_subdir" -}}
+ {{ $ghs_rename := "" -}}
+ {{ if reflect.IsMap $ghs_base -}}
+ {{ $ghs_rename = $ghs_base.to -}}
+ {{ $ghs_base = $ghs_base.from -}}
+ {{ end -}}
+ {{ with $ghs_base -}}
+ {{ $gh_repo_path = replaceRE . $ghs_rename $gh_repo_path -}}
+ {{ end -}}
+
+ {{ $viewURL := printf "%s/tree/%s" $gh_repo $gh_repo_path -}}
+ {{ $editURL := printf "%s/edit/%s" $gh_repo $gh_repo_path -}}
+ {{ $issuesURL := printf "%s/issues/new?title=%s" $gh_repo (safeURL $.Title ) -}}
+ {{ $newPageStub := resources.Get "stubs/new-page-template.md" -}}
+ {{ $newPageQS := querify "value" $newPageStub.Content "filename" "change-me.md" | safeURL -}}
+ {{ $newPageURL := printf "%s/new/%s?%s" $gh_repo $gh_repo_path $newPageQS -}}
{{- $apiReferenceMetaLinks := $.Store.Get "apiReferenceMetaLinks" -}}
@@ -51,9 +67,9 @@
{{ T "auto_generated_edit_notice" | safeHTML }}
{{- end -}}
- {{ end }}
- {{ with .CurrentSection.AlternativeOutputFormats.Get "print" }}
-
{{ T "print_entire_section" }}
- {{ end }}
-
+{{ end -}}
+{{ with .CurrentSection.AlternativeOutputFormats.Get "print" -}}
+
{{ T "print_entire_section" }}
{{ end }}
+
+{{ end -}}
diff --git a/layouts/partials/scripts.html b/layouts/partials/scripts.html
index 9538ec8ec79..084055fd096 100644
--- a/layouts/partials/scripts.html
+++ b/layouts/partials/scripts.html
@@ -32,7 +32,6 @@
{{ $jsSearch := resources.Get "js/search.js" | resources.ExecuteAsTemplate "js/search.js" .Site.Home }}
{{ if .Site.Params.offlineSearch }}
{{ $jsSearch = resources.Get "js/offline-search.js" }}
-{{/* Revisit this if / when either of https://github.com/google/docsy/issues/2194 and https://github.com/google/docsy/pull/1512 are closed */}}
{{ else if .Site.Params.customSearch }}
{{ $jsSearch = resources.Get "js/custom-search.js" }}
{{ end }}
diff --git a/layouts/partials/search-input.html b/layouts/partials/search-input.html
index 1c0530a4ea3..9b5dd792b87 100644
--- a/layouts/partials/search-input.html
+++ b/layouts/partials/search-input.html
@@ -1,8 +1,4 @@
-{{/*
-Copied from Docsy with the addition of the customSearch block.
-This can be deleted once https://github.com/google/docsy/issues/2194 and https://github.com/google/docsy/pull/1512 are closed
-and the site has been updated to incorporate the upstream change.
-*/}}
+{{/* Copied from Docsy with the addition of the customSearch block. */}}
{{ if .Site.Params.gcs_engine_id -}}
diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html
deleted file mode 100644
index a57cad567ba..00000000000
--- a/layouts/partials/toc.html
+++ /dev/null
@@ -1,8 +0,0 @@
-{{ partial "page-meta-links.html" . }}
-{{ if not .Params.notoc }}
-{{ with .TableOfContents }}
-{{ if ge (len .) 100 }}
-{{ . }}
-{{ end }}
-{{ end }}
-{{ end }}
\ No newline at end of file