diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index be3ac32..7c33ca7 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -21,7 +21,7 @@ jobs: - name: Setup Hugo uses: peaceiris/actions-hugo@v2 with: - hugo-version: '0.104.3' + hugo-version: '0.147.8' extended: true - name: Build diff --git a/website/config.toml b/website/config.toml index 21c13b7..23c9dd1 100644 --- a/website/config.toml +++ b/website/config.toml @@ -31,3 +31,8 @@ theme = "hugo-book" BookCommitPath = 'commit' BookEditPath = 'edit/main' BookIndexPage = 'README.md' + +[modules] + [[module.mounts]] + source = '../README.md' + target = 'content/_index.md' diff --git a/website/content/_index.md b/website/content/_index.md deleted file mode 120000 index fe84005..0000000 --- a/website/content/_index.md +++ /dev/null @@ -1 +0,0 @@ -../../README.md \ No newline at end of file diff --git a/website/layouts/404.html b/website/layouts/404.html new file mode 100644 index 0000000..60dcdc6 --- /dev/null +++ b/website/layouts/404.html @@ -0,0 +1,35 @@ + + + + + {{ partial "docs/html-head" . }} + {{ partial "docs/inject/head" . }} + + + + + +
+
+

404

+

Page Not Found

+

+ {{ .Site.Title }} +

+
+
+ + {{ partial "docs/inject/body" . }} + {{ template "_internal/google_analytics.html" . }} + + + diff --git a/website/layouts/partials/docs/footer.html b/website/layouts/partials/docs/footer.html index 5aa5a07..defbd70 100644 --- a/website/layouts/partials/docs/footer.html +++ b/website/layouts/partials/docs/footer.html @@ -1,5 +1,5 @@
-{{ if .Site.IsMultiLingual }} +{{ if hugo.IsMultilingual }} {{ partial "docs/languages" . }} {{ end }} diff --git a/website/layouts/partials/docs/html-head.html b/website/layouts/partials/docs/html-head.html new file mode 100644 index 0000000..b24730d --- /dev/null +++ b/website/layouts/partials/docs/html-head.html @@ -0,0 +1,43 @@ + + + + + +{{- template "_internal/opengraph.html" . -}} + +{{ partial "docs/title" . }} | {{ .Site.Title -}} + +{{- $manifest := resources.Get "manifest.json" | resources.ExecuteAsTemplate "manifest.json" . }} + + + +{{- range .Translations }} + +{{ end -}} + + +{{- $styles := resources.Get "book.scss" | resources.ExecuteAsTemplate "book.scss" . | css.Sass | resources.Minify | resources.Fingerprint }} + + +{{- if default true .Site.Params.BookSearch }} +{{- $searchJSFile := printf "%s.search.js" .Language.Lang }} +{{- $searchJS := resources.Get "search.js" | resources.ExecuteAsTemplate $searchJSFile . | resources.Minify | resources.Fingerprint }} + +{{ end -}} + +{{- if .Site.Params.BookServiceWorker }} +{{- $swJS := resources.Get "sw-register.js" | resources.ExecuteAsTemplate "sw.js" . | resources.Minify | resources.Fingerprint }} + +{{ end -}} + +{{- template "_internal/google_analytics.html" . -}} + + +{{- with .OutputFormats.Get "rss" -}} + {{ printf `` .Rel .MediaType.Type .Permalink $.Site.Title | safeHTML }} +{{ end -}} + +{{ "" | safeHTML }}