Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/blankoworld/hugo_theme_adam_eve.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier DOSSMANN <git@dossmann.net>2019-08-17 19:50:40 +0300
committerOlivier DOSSMANN <git@dossmann.net>2019-08-17 19:50:40 +0300
commite925bcdaba5017c526351e113ab0b8140e6fe2f3 (patch)
tree026dd5c3bd6dc81f66420abe2113f4e9d8b77647
parentefd806d3356f3daaa905670a5641e54f1faa9100 (diff)
Fix #3 - Adapt Adam & Eve theme to Hugo v0.57:
* change example config.toml to disable some kinds of pages * homepage: add posts list * new params: `NoHomepagePostList` to disable this list if possible
-rw-r--r--README.md12
-rw-r--r--exampleSite/config.toml1
-rw-r--r--layouts/index.html11
-rw-r--r--theme.toml2
4 files changed, 24 insertions, 2 deletions
diff --git a/README.md b/README.md
index 4d152a2..a916333 100644
--- a/README.md
+++ b/README.md
@@ -127,7 +127,17 @@ Pay attention to read this **entire page** before applying what you read!
By default a menu is displayed on Homepage. You can disable it. Use `nohomebar` in **config.toml** like this:
```ini
-[params] nohomebar = true
+[params]
+ nohomebar = true
+```
+
+### Homepage posts list
+
+By default a list of post from `post` directory is shown on Homepage. You can disable it. Use `NoHomepagePostList` in **config.toml** like this:
+
+```ini
+[params]
+ NoHomepagePostList = true
```
## Contributing
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index ebbd1d8..5443043 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -1,6 +1,7 @@
baseURL = "https://example.org"
theme = "hugo_theme_adam_eve"
DefaultContentLanguage = "en"
+disableKinds = ["taxonomy", "taxonomyTerm", "section"]
[Languages]
[Languages.fr]
diff --git a/layouts/index.html b/layouts/index.html
index dd392f7..283990f 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -17,6 +17,17 @@
</header>
<main>
{{ .Content }}
+ {{ $pages := where .Site.RegularPages "Type" "post" }}
+ {{ if isset .Site.Params "nohomepagepostlist" }}
+ <!-- No homepage post list -->
+ {{ else if ne (len $pages) 0 }}
+ <h1>Posts</h1>
+ <ul>
+ {{ range $pages.ByTitle }}
+ <li><a href="{{ .Permalink }}">{{ .Name }}</a></li>
+ {{ end }}
+ </ul>
+ {{ end }}
</main>
<footer>
<hr />
diff --git a/theme.toml b/theme.toml
index 1a0c6cb..cfddb60 100644
--- a/theme.toml
+++ b/theme.toml
@@ -8,7 +8,7 @@ description = "A simple wiki in its original formal state"
homepage = "https://github.com/blankoworld/hugo_theme_adam_eve"
tags = ['minimal', 'wiki-like', 'documentation']
features = ['wiki-like', 'responsive', 'minimal', 'shortcode', 'clean', 'boxes', 'i18n']
-min_version = "0.43"
+min_version = "0.57"
[author]
name = "Olivier DOSSMANN"