From 58f8935d1e2348d7c9aa03ca2fac8049f486ad3d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=80=8A=E7=8B=BC?= <47265026+volfclub@users.noreply.github.com> Date: Wed, 23 Jun 2021 21:11:17 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9E=20fix=20issues=20352?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Solve this problem: https://github.com/alex-shpak/hugo-book/issues/352 The Reason: https://github.com/gohugoio/hugo/issues/8688 --- exampleSite/config.toml | 3 ++- exampleSite/config.yaml | 3 ++- exampleSite/{content => content.en}/_index.md | 0 exampleSite/{content => content.en}/docs/example/_index.md | 0 .../docs/example/collapsed/3rd-level/4th-level.md | 0 .../docs/example/collapsed/3rd-level/_index.md | 0 .../{content => content.en}/docs/example/collapsed/_index.md | 0 exampleSite/{content => content.en}/docs/example/hidden.md | 0 .../docs/example/table-of-contents/_index.md | 0 .../docs/example/table-of-contents/with-toc.md | 0 .../docs/example/table-of-contents/without-toc.md | 0 exampleSite/{content => content.en}/docs/shortcodes/_index.md | 0 exampleSite/{content => content.en}/docs/shortcodes/buttons.md | 0 exampleSite/{content => content.en}/docs/shortcodes/columns.md | 0 exampleSite/{content => content.en}/docs/shortcodes/details.md | 0 exampleSite/{content => content.en}/docs/shortcodes/expand.md | 0 exampleSite/{content => content.en}/docs/shortcodes/hints.md | 0 exampleSite/{content => content.en}/docs/shortcodes/katex.md | 0 exampleSite/{content => content.en}/docs/shortcodes/mermaid.md | 0 .../{content => content.en}/docs/shortcodes/section/_index.md | 0 .../docs/shortcodes/section/first-page.md | 0 .../docs/shortcodes/section/second-page.md | 0 exampleSite/{content => content.en}/docs/shortcodes/tabs.md | 0 exampleSite/{content => content.en}/menu/index.md | 0 exampleSite/{content => content.en}/posts/_index.md | 0 .../{content => content.en}/posts/creating-a-new-theme.md | 0 exampleSite/{content => content.en}/posts/goisforlovers.md | 0 exampleSite/{content => content.en}/posts/hugoisforlovers.md | 0 .../{content => content.en}/posts/migrate-from-jekyll.md | 0 29 files changed, 4 insertions(+), 2 deletions(-) rename exampleSite/{content => content.en}/_index.md (100%) rename exampleSite/{content => content.en}/docs/example/_index.md (100%) rename exampleSite/{content => content.en}/docs/example/collapsed/3rd-level/4th-level.md (100%) rename exampleSite/{content => content.en}/docs/example/collapsed/3rd-level/_index.md (100%) rename exampleSite/{content => content.en}/docs/example/collapsed/_index.md (100%) rename exampleSite/{content => content.en}/docs/example/hidden.md (100%) rename exampleSite/{content => content.en}/docs/example/table-of-contents/_index.md (100%) rename exampleSite/{content => content.en}/docs/example/table-of-contents/with-toc.md (100%) rename exampleSite/{content => content.en}/docs/example/table-of-contents/without-toc.md (100%) rename exampleSite/{content => content.en}/docs/shortcodes/_index.md (100%) rename exampleSite/{content => content.en}/docs/shortcodes/buttons.md (100%) rename exampleSite/{content => content.en}/docs/shortcodes/columns.md (100%) rename exampleSite/{content => content.en}/docs/shortcodes/details.md (100%) rename exampleSite/{content => content.en}/docs/shortcodes/expand.md (100%) rename exampleSite/{content => content.en}/docs/shortcodes/hints.md (100%) rename exampleSite/{content => content.en}/docs/shortcodes/katex.md (100%) rename exampleSite/{content => content.en}/docs/shortcodes/mermaid.md (100%) rename exampleSite/{content => content.en}/docs/shortcodes/section/_index.md (100%) rename exampleSite/{content => content.en}/docs/shortcodes/section/first-page.md (100%) rename exampleSite/{content => content.en}/docs/shortcodes/section/second-page.md (100%) rename exampleSite/{content => content.en}/docs/shortcodes/tabs.md (100%) rename exampleSite/{content => content.en}/menu/index.md (100%) rename exampleSite/{content => content.en}/posts/_index.md (100%) rename exampleSite/{content => content.en}/posts/creating-a-new-theme.md (100%) rename exampleSite/{content => content.en}/posts/goisforlovers.md (100%) rename exampleSite/{content => content.en}/posts/hugoisforlovers.md (100%) rename exampleSite/{content => content.en}/posts/migrate-from-jekyll.md (100%) diff --git a/exampleSite/config.toml b/exampleSite/config.toml index dfd9a31..d0ead52 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -3,6 +3,7 @@ baseURL = 'https://example.com/' title = 'Hugo Book' theme = 'hugo-book' +# defaultContentLanguage = "en" # Book configuration disablePathToLower = true @@ -23,7 +24,7 @@ enableGitInfo = true [languages] [languages.en] languageName = 'English' - contentDir = 'content' + contentDir = 'content.en' weight = 1 [languages.ru] diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 4f439c6..60b771c 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -3,6 +3,7 @@ baseURL: https://example.com/ title: Hugo Book theme: hugo-book +# defaultContentLanguage: en # Book configuration disablePathToLower: true @@ -23,7 +24,7 @@ markup: languages: en: languageName: English - contentDir: content + contentDir: content.en weight: 1 ru: languageName: Russian diff --git a/exampleSite/content/_index.md b/exampleSite/content.en/_index.md similarity index 100% rename from exampleSite/content/_index.md rename to exampleSite/content.en/_index.md diff --git a/exampleSite/content/docs/example/_index.md b/exampleSite/content.en/docs/example/_index.md similarity index 100% rename from exampleSite/content/docs/example/_index.md rename to exampleSite/content.en/docs/example/_index.md diff --git a/exampleSite/content/docs/example/collapsed/3rd-level/4th-level.md b/exampleSite/content.en/docs/example/collapsed/3rd-level/4th-level.md similarity index 100% rename from exampleSite/content/docs/example/collapsed/3rd-level/4th-level.md rename to exampleSite/content.en/docs/example/collapsed/3rd-level/4th-level.md diff --git a/exampleSite/content/docs/example/collapsed/3rd-level/_index.md b/exampleSite/content.en/docs/example/collapsed/3rd-level/_index.md similarity index 100% rename from exampleSite/content/docs/example/collapsed/3rd-level/_index.md rename to exampleSite/content.en/docs/example/collapsed/3rd-level/_index.md diff --git a/exampleSite/content/docs/example/collapsed/_index.md b/exampleSite/content.en/docs/example/collapsed/_index.md similarity index 100% rename from exampleSite/content/docs/example/collapsed/_index.md rename to exampleSite/content.en/docs/example/collapsed/_index.md diff --git a/exampleSite/content/docs/example/hidden.md b/exampleSite/content.en/docs/example/hidden.md similarity index 100% rename from exampleSite/content/docs/example/hidden.md rename to exampleSite/content.en/docs/example/hidden.md diff --git a/exampleSite/content/docs/example/table-of-contents/_index.md b/exampleSite/content.en/docs/example/table-of-contents/_index.md similarity index 100% rename from exampleSite/content/docs/example/table-of-contents/_index.md rename to exampleSite/content.en/docs/example/table-of-contents/_index.md diff --git a/exampleSite/content/docs/example/table-of-contents/with-toc.md b/exampleSite/content.en/docs/example/table-of-contents/with-toc.md similarity index 100% rename from exampleSite/content/docs/example/table-of-contents/with-toc.md rename to exampleSite/content.en/docs/example/table-of-contents/with-toc.md diff --git a/exampleSite/content/docs/example/table-of-contents/without-toc.md b/exampleSite/content.en/docs/example/table-of-contents/without-toc.md similarity index 100% rename from exampleSite/content/docs/example/table-of-contents/without-toc.md rename to exampleSite/content.en/docs/example/table-of-contents/without-toc.md diff --git a/exampleSite/content/docs/shortcodes/_index.md b/exampleSite/content.en/docs/shortcodes/_index.md similarity index 100% rename from exampleSite/content/docs/shortcodes/_index.md rename to exampleSite/content.en/docs/shortcodes/_index.md diff --git a/exampleSite/content/docs/shortcodes/buttons.md b/exampleSite/content.en/docs/shortcodes/buttons.md similarity index 100% rename from exampleSite/content/docs/shortcodes/buttons.md rename to exampleSite/content.en/docs/shortcodes/buttons.md diff --git a/exampleSite/content/docs/shortcodes/columns.md b/exampleSite/content.en/docs/shortcodes/columns.md similarity index 100% rename from exampleSite/content/docs/shortcodes/columns.md rename to exampleSite/content.en/docs/shortcodes/columns.md diff --git a/exampleSite/content/docs/shortcodes/details.md b/exampleSite/content.en/docs/shortcodes/details.md similarity index 100% rename from exampleSite/content/docs/shortcodes/details.md rename to exampleSite/content.en/docs/shortcodes/details.md diff --git a/exampleSite/content/docs/shortcodes/expand.md b/exampleSite/content.en/docs/shortcodes/expand.md similarity index 100% rename from exampleSite/content/docs/shortcodes/expand.md rename to exampleSite/content.en/docs/shortcodes/expand.md diff --git a/exampleSite/content/docs/shortcodes/hints.md b/exampleSite/content.en/docs/shortcodes/hints.md similarity index 100% rename from exampleSite/content/docs/shortcodes/hints.md rename to exampleSite/content.en/docs/shortcodes/hints.md diff --git a/exampleSite/content/docs/shortcodes/katex.md b/exampleSite/content.en/docs/shortcodes/katex.md similarity index 100% rename from exampleSite/content/docs/shortcodes/katex.md rename to exampleSite/content.en/docs/shortcodes/katex.md diff --git a/exampleSite/content/docs/shortcodes/mermaid.md b/exampleSite/content.en/docs/shortcodes/mermaid.md similarity index 100% rename from exampleSite/content/docs/shortcodes/mermaid.md rename to exampleSite/content.en/docs/shortcodes/mermaid.md diff --git a/exampleSite/content/docs/shortcodes/section/_index.md b/exampleSite/content.en/docs/shortcodes/section/_index.md similarity index 100% rename from exampleSite/content/docs/shortcodes/section/_index.md rename to exampleSite/content.en/docs/shortcodes/section/_index.md diff --git a/exampleSite/content/docs/shortcodes/section/first-page.md b/exampleSite/content.en/docs/shortcodes/section/first-page.md similarity index 100% rename from exampleSite/content/docs/shortcodes/section/first-page.md rename to exampleSite/content.en/docs/shortcodes/section/first-page.md diff --git a/exampleSite/content/docs/shortcodes/section/second-page.md b/exampleSite/content.en/docs/shortcodes/section/second-page.md similarity index 100% rename from exampleSite/content/docs/shortcodes/section/second-page.md rename to exampleSite/content.en/docs/shortcodes/section/second-page.md diff --git a/exampleSite/content/docs/shortcodes/tabs.md b/exampleSite/content.en/docs/shortcodes/tabs.md similarity index 100% rename from exampleSite/content/docs/shortcodes/tabs.md rename to exampleSite/content.en/docs/shortcodes/tabs.md diff --git a/exampleSite/content/menu/index.md b/exampleSite/content.en/menu/index.md similarity index 100% rename from exampleSite/content/menu/index.md rename to exampleSite/content.en/menu/index.md diff --git a/exampleSite/content/posts/_index.md b/exampleSite/content.en/posts/_index.md similarity index 100% rename from exampleSite/content/posts/_index.md rename to exampleSite/content.en/posts/_index.md diff --git a/exampleSite/content/posts/creating-a-new-theme.md b/exampleSite/content.en/posts/creating-a-new-theme.md similarity index 100% rename from exampleSite/content/posts/creating-a-new-theme.md rename to exampleSite/content.en/posts/creating-a-new-theme.md diff --git a/exampleSite/content/posts/goisforlovers.md b/exampleSite/content.en/posts/goisforlovers.md similarity index 100% rename from exampleSite/content/posts/goisforlovers.md rename to exampleSite/content.en/posts/goisforlovers.md diff --git a/exampleSite/content/posts/hugoisforlovers.md b/exampleSite/content.en/posts/hugoisforlovers.md similarity index 100% rename from exampleSite/content/posts/hugoisforlovers.md rename to exampleSite/content.en/posts/hugoisforlovers.md diff --git a/exampleSite/content/posts/migrate-from-jekyll.md b/exampleSite/content.en/posts/migrate-from-jekyll.md similarity index 100% rename from exampleSite/content/posts/migrate-from-jekyll.md rename to exampleSite/content.en/posts/migrate-from-jekyll.md