From 567d0e2a7c64950209fdff95857a202b6b8e3736 Mon Sep 17 00:00:00 2001 From: MuhammadAashirAslam Date: Tue, 7 Jul 2026 12:45:19 +0500 Subject: [PATCH] Migrate Jekyll _layouts to Hugo layouts/_default --- .gitignore | 5 +- layouts/_default/baseof.html | 81 +++++++++++++++++++++++++++++ layouts/_default/default_print.html | 13 +++++ layouts/_default/list.html | 34 ++++++++++++ layouts/_default/none.html | 1 + layouts/_default/page.html | 32 ++++++++++++ layouts/_default/page_print.html | 21 ++++++++ layouts/_default/single.html | 32 ++++++++++++ 8 files changed, 218 insertions(+), 1 deletion(-) create mode 100644 layouts/_default/baseof.html create mode 100644 layouts/_default/default_print.html create mode 100644 layouts/_default/list.html create mode 100644 layouts/_default/none.html create mode 100644 layouts/_default/page.html create mode 100644 layouts/_default/page_print.html create mode 100644 layouts/_default/single.html diff --git a/.gitignore b/.gitignore index d87a59686ac..bc360b98066 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,7 @@ _pdf .idea vendor/ .bundle/ -Gemfile.lock \ No newline at end of file +Gemfile.lock +.hugo_build.lock +/public/ +/resources/ diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 00000000000..5f723548091 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,81 @@ + + +{{- with .Params.redirect_to }} + + + Redirecting… + + + + + + +

Redirecting…

+ Click here if you are not redirected. + +{{- else }} + + {{ partial "head.html" . }} + + +
+ {{ partial "topnav.html" . }} + {{ partial "news_banner.html" (dict "page" . "onlanding" .IsHome) }} +
+ + {{- $isLanding := or .IsHome (eq .Layout "landing_page") -}} + {{- if $isLanding }} +
+ {{ block "main" . }}{{ end }} +
+ {{- else }} + {{- $hideSidebar := eq (.Param "hide_sidebar") true -}} +
+ {{ if $hideSidebar }} +
+ {{ block "main" . }}{{ end }} +
+ {{ else }} +
+ +
+ {{ block "main" . }}{{ end }} +
+
+ {{ end }} +
+ {{- end }} + + {{ partial "footer.html" . }} + {{ partial "scroll_to_top.html" . }} + {{ partial "google_analytics.html" . }} + + + + {{ if .IsHome }} + + + {{ end }} + + +{{- end }} + diff --git a/layouts/_default/default_print.html b/layouts/_default/default_print.html new file mode 100644 index 00000000000..99cb5c3df5a --- /dev/null +++ b/layouts/_default/default_print.html @@ -0,0 +1,13 @@ + + + + {{ partial "head_print.html" . }} + + + + + diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 00000000000..c1bfeba807d --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,34 @@ +{{ define "main" }} +
+
+

{{ .Title }}

+
+ + {{ with .Params.summary }} +
{{ . | markdownify }}
+ {{ end }} + +
+
+ {{ partial "toc.html" . }} +
+
+ {{ partial "edit_metadata.html" . }} +
+
+ + {{ .Content }} + + {{ $pages := .RegularPages }} + {{ if $pages }} +
+ {{ range $pages.ByTitle }} +
+

{{ .Title }}

+ {{ with .Params.summary }}

{{ . | markdownify }}

{{ end }} +
+ {{ end }} +
+ {{ end }} +
+{{ end }} diff --git a/layouts/_default/none.html b/layouts/_default/none.html new file mode 100644 index 00000000000..68a09ae661b --- /dev/null +++ b/layouts/_default/none.html @@ -0,0 +1 @@ +{{ .Content }} diff --git a/layouts/_default/page.html b/layouts/_default/page.html new file mode 100644 index 00000000000..62456b7a8d7 --- /dev/null +++ b/layouts/_default/page.html @@ -0,0 +1,32 @@ +{{ define "main" }} +
+
+

{{ .Title }}

+
+ + {{ with .Params.summary }} +
{{ . | markdownify }}
+ {{ end }} + +
+
+ {{ partial "toc.html" . }} +
+
+ {{ partial "edit_metadata.html" . }} +
+
+ + {{ .Content }} + + {{ with .Params.tags }} +
+ Tags: + {{ range . }} + {{ . }} + {{ end }} +
+ {{ end }} + {{ partial "breadcrumb.html" . }} +
+{{ end }} diff --git a/layouts/_default/page_print.html b/layouts/_default/page_print.html new file mode 100644 index 00000000000..d2c37886714 --- /dev/null +++ b/layouts/_default/page_print.html @@ -0,0 +1,21 @@ + + + + {{ partial "head_print.html" . }} + + + + + diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 00000000000..62456b7a8d7 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,32 @@ +{{ define "main" }} +
+
+

{{ .Title }}

+
+ + {{ with .Params.summary }} +
{{ . | markdownify }}
+ {{ end }} + +
+
+ {{ partial "toc.html" . }} +
+
+ {{ partial "edit_metadata.html" . }} +
+
+ + {{ .Content }} + + {{ with .Params.tags }} +
+ Tags: + {{ range . }} + {{ . }} + {{ end }} +
+ {{ end }} + {{ partial "breadcrumb.html" . }} +
+{{ end }}