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

github.com/geschke/hugo-tikva.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRalf Geschke <ralf@kuerbis.org>2019-08-28 15:24:43 +0300
committerRalf Geschke <ralf@kuerbis.org>2019-08-28 15:24:43 +0300
commitaf5722f1f525a931388f8118e0f29c45ebfb214a (patch)
treee3c6a071a809ed6693ab1d181075ca2c1aa9b367
parentbcd1ef4c438da855496bdd61d4ab5fba9df6b98c (diff)
Fix regarding https://github.com/gohugoio/hugoThemes/issues/682 , some demo content added, so the example page should now display sidebar, footer and subfooterv0.2.5
-rw-r--r--CHANGELOG.md12
-rw-r--r--README.md49
-rw-r--r--exampleSite/config.toml36
-rw-r--r--exampleSite/content/sections/footer/column01.md2
-rw-r--r--layouts/_default/baseof.html2
-rw-r--r--layouts/_default/list.html16
-rw-r--r--layouts/index.html14
-rw-r--r--layouts/partials/footer_container.html9
-rw-r--r--layouts/partials/sidebar_container.html12
-rw-r--r--layouts/partials/sidebar_item.html2
-rw-r--r--layouts/partials/subfooter_container.html5
-rw-r--r--theme.toml4
12 files changed, 140 insertions, 23 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 69bd90b..1aea823 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,18 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## 0.2.5 - 2019-08-28
+
+### Changed
+
+- Fix due to https://github.com/gohugoio/hugoThemes/issues/682 (Demos with empty homepage and/or wrong posts list) - hopefully
+- Section content hints added to README.md
+
+### Added
+
+- Example content in sidebar, footer and subfooter will be shown as default when the section content folders are missing. The example content comes from the config.toml file, so just delete these lines or deactivate the section concerned.
+
+
## 0.2.4 - 2019-07-26
### Changed
diff --git a/README.md b/README.md
index 9f6114a..a4f0545 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@ It's also possible to edit some color options by config option.
## Features
* Responsive design, using the Bootstrap framework
-* More than 30 themes included, half of them newly created, the other half taken from the Bootswatch project
+* More than 30 designs included, half of them newly created, the other half taken from the Bootswatch project
* Three main layouts available: Content column without sidebar, sidebar on right and sidebar on left side
* Customizable font settings (size, font type and variant), support of Google Fonts included
* Support of Google Analytics (with the internal async template), Matomo and Yandex Metrica
@@ -63,6 +63,53 @@ Check out `exampleSite/config.toml` for theme configuration options and the cont
I've tried to comment as much as possible in the configuration file, but the theme and documentation are far away from being complete. It is still work in progress and currently some features of Hugo aren't supported.
+### Sections (Sidebars, Footer, Subfooter)
+
+As you can see in the screenshots this theme supports three content sections which aren't shown in the demo site, because in the demo only the default content is used. To enable the sections, create a folder `sections` into your content folder. Then create one or more content folders in the `sections` folder with their special names `footer`, `sidebar` and `subfooter`. In every of these folders you can place any page content you want, make the page bundle "headless" and enable the section (footer, subfooter, sidebars) in the site config file.
+
+For a complete example please have a look at the `exampleSite` folder. The directory structure is at follows:
+
+```
+content/
+ [...]
+ sections/
+ footer/
+ column01.md
+ column02.md
+ column03.md
+ index.md
+ [...]
+ sidebar/
+ content01.md
+ content02.html
+ index.md
+ subfooter/
+ content.md
+ index.md
+ [...]
+```
+
+To activate the content sections, enable them in your config file:
+
+```
+[params.theme.footer]
+ enabled = true # Show the footer part
+ #numberColumns = 3 # Set number of columns available in footer of a page. Use the "footer" folder in the page structure to add content. If nothing is set, the default number is 3. Currently.i.e. since v0.2 not used, the number of columns is identical to the number of files in footer directory.
+
+[...]
+
+[params.theme.subfooter]
+ enabled = true # Show the content below the footer
+[...]
+
+
+[params.sidebar]
+ enabled = true # default false; set to true to enable sidebar
+ style = 'right' # options: 'left', 'right'. Left means sidebar on the left side, right displays the sidebar on the right side
+
+
+```
+
## Menu
The navbar displays the `main` menus by default. You can find more details about how to configure it [here](https://gohugo.io/templates/menu-templates/), as well as in the `exampleSite`.
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 629fea8..0908e6e 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -108,6 +108,8 @@ paginate = 2
# Without the "headless" setting the sidebar will not be displayed!
# See https://gohugo.io/content-management/page-bundles/#headless-bundle
# You can modify the style with a partial "footer_column.html", see example in "layouts/partials/".
+# If you don't have content files in the footer area, the demo texts from below will be shown. If you don't want this, please delete
+# the [[params.theme.footer.demoColumn]] entries or just disable the footer by setting enabled = false.
[params.theme.footer]
enabled = true # Show the footer part
@@ -116,6 +118,17 @@ paginate = 2
linkColor = '' # Set color of links as #rrggbb code, leave empty for default
backgroundColor = '#29281f' # Set color of background as #rrggbb code, leave empty for default
+ [[params.theme.footer.demoColumn]]
+ text = 'This is a placeholder for a content file of the footer. You can use Markdown or HTML here. Just place your content files into a folder "sections/footer" in your content directory, make the page bundle "headless" and enable the footer in the site config file.'
+
+ [[params.theme.footer.demoColumn]]
+ text = 'More footer content.'
+
+ [[params.theme.footer.demoColumn]]
+ text = 'To change this, please have a look at the README.md and the comments of the footer section in the config.toml file.'
+
+
+
# Subfooter configuration
# To create a subfooter, create a directory "sections/subfooter" into your project’s content directory.
@@ -125,11 +138,12 @@ paginate = 2
# See https://gohugo.io/content-management/page-bundles/#headless-bundle
# You can modify the style with a partial "subfooter_item.html", see example in "layouts/partials/".
-[params.theme.subfooter]
+[params.theme.subfooter]
enabled = true # Show the content below the footer
fontColor = '' # Text color in subfooter. Leave empty to use the theme default.
linkColor = '' # Link color in subfooter. Leave empty to use the theme default.
backgroundColor = '' # Background color of subfooter. Leave empty to use the theme default.
+ demoContent = 'Powered by <a href="https://gohugo.io">Hugo</a>. Theme <a href="https://github.com/geschke/hugo-tikva">Tikva</a> by <a href="https://www.kuerbis.org">Ralf Geschke</a>. As you can see, this text is only an example of the area below the footer. To change this, please have a look at the included example site and the section "Subfooter configuration" in the config.toml file. '
# Font configuration
@@ -192,12 +206,22 @@ paginate = 2
[params.sidebar]
enabled = true # default false; set to true to enable sidebar
style = 'right' # options: 'left', 'right'. Left means sidebar on the left side, right displays the sidebar on the right side
+
+ [[params.sidebar.demoColumn]]
+ title = 'About'
+ text = '<p class="mb-0">Etiam porta <em>sem malesuada magna</em> mollis euismod. Cras mattis consectetur purus sit amet fermentum. Aenean lacinia bibendum nulla sed consectetur.</p>'
+
+ [[params.sidebar.demoColumn]]
+ title = 'Example Content'
+ text = 'You can place everything you want in this area. Just add HTML or Markdown files into a folder named "sections/sidebar" in your content folder and declare the folder as "headless". This is an example of modifying the style with an individual "sidebar_item.html" partial. '
+
# Menu section
# This is an example of the main menu. You can also use the in-file setting in the header of the content files.
+
[menu]
[[menu.main]]
@@ -221,9 +245,9 @@ paginate = 2
weight = 30
+
+[taxonomies]
+category = "categories"
+tag = "tags"
+series = "series"
- [[menu.main]]
- name = "Feedback"
- url = "/feedback/"
- weight = 40
-
diff --git a/exampleSite/content/sections/footer/column01.md b/exampleSite/content/sections/footer/column01.md
index 2d30fbc..5e95969 100644
--- a/exampleSite/content/sections/footer/column01.md
+++ b/exampleSite/content/sections/footer/column01.md
@@ -1,3 +1,3 @@
<div>
-This is a placeholder for a content file of the footer. You can use Markdown or HTML here. Just place your content files into a folder "sections/footer" in your content directory, make the page bundle "headless" and enable the footer in the site config file.
+This is a placeholder for a content file of the footer. You can use Markdown or HTML here. Just place your content files into a folder "sections/footer" in your content directory, make the page bundle "headless" and enable the footer in the site config file.
</div>
diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html
index ebf6823..d291ac1 100644
--- a/layouts/_default/baseof.html
+++ b/layouts/_default/baseof.html
@@ -21,7 +21,7 @@
{{- block "main" . }}{{- end }}
</div>
{{- if and (default false .Site.Params.Sidebar.Enabled) (eq "right" (default "right" .Site.Params.Sidebar.Style)) }}
- {{ partial "sidebar_container.html" . }}
+ {{ partial "sidebar_container.html" . }}
{{- end -}}
</div>
</div>
diff --git a/layouts/_default/list.html b/layouts/_default/list.html
index 37c907b..ee0c89d 100644
--- a/layouts/_default/list.html
+++ b/layouts/_default/list.html
@@ -8,14 +8,16 @@
<!-- "{{.Content}}" pulls from the markdown content of the corresponding _index.md -->
{{.Content}}
</article>
-
- <!-- Ranges through content/post/*.md -->
- {{ range .Paginator.Pages }}
-
- {{ .Render "summary"}}
- {{ end }}
-
+ {{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
+
+ {{ $paginator := .Paginate ($pages) -}}
+ {{ range $paginator.Pages -}}
+ {{ .Render "summary"}}
+ {{ end -}}
{{ template "_internal/pagination.html" . }}
+
+
</main>
+
{{ end }}
diff --git a/layouts/index.html b/layouts/index.html
index 1c48b86..a0bf70a 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -7,10 +7,24 @@
<span class="subtitle">{{.}}</span>
{{ end }}
</header>
+
+
<div class="homepage-content">
<!-- Note that the content for index.html, as a sort of list page, will pull from content/_index.md -->
{{.Content}}
+
+
+ <!-- Changes due to 0.57 it seems to work, but feels strange -->
+ {{ $pages := where .Site.RegularPages "Type" "in" .Site.Params.mainSections }}
+ {{ range $pages -}}
+ {{ .Render "summary"}}
+ {{ end -}}
+
</div>
+
+
+
+
<div>
<!-- Note that .Pages is the same as .Site.RegularPages on the homepage template. -->
{{/* Activate this (or copy the template into the site's layout folder) to display a page list
diff --git a/layouts/partials/footer_container.html b/layouts/partials/footer_container.html
index af74132..3f6f8c5 100644
--- a/layouts/partials/footer_container.html
+++ b/layouts/partials/footer_container.html
@@ -9,7 +9,14 @@
{{ range sort $footerItems.Resources "Name" }}
{{ partial "footer_column.html" . }}
{{ end }}
- {{ end }}
+ {{ else if .Site.Params.Theme.Footer.demoColumn }}
+ {{ range .Site.Params.Theme.Footer.demoColumn }}
+ <div class="col">
+ {{ .text | safeHTML }}
+ </div>
+ {{ end }}
+ {{ end }}
+
</div>
</footer>
</div>
diff --git a/layouts/partials/sidebar_container.html b/layouts/partials/sidebar_container.html
index f3965ed..875bb04 100644
--- a/layouts/partials/sidebar_container.html
+++ b/layouts/partials/sidebar_container.html
@@ -1,11 +1,21 @@
<aside class="col-md-3 tikva-sidebar">
-
{{ $sidebarItems := .Site.GetPage "/sections/sidebar" }}
{{ if $sidebarItems }}
{{ range sort $sidebarItems.Resources "Name" }}
{{ partial "sidebar_item.html" . }}
+
+ {{ end }}
+{{ else if .Site.Params.Sidebar.demoColumn }}
+
+ {{ range .Site.Params.Sidebar.demoColumn }}
+ <div class="col">
+ <div class="p-3 mb-3 bg-light rounded">
+ <h4>{{ .title }}</h4>
+ <p>{{ .text | safeHTML }}</p>
+ </div>
+ </div>
{{ end }}
{{ end }}
</aside><!-- /.tikva-sidebar -->
diff --git a/layouts/partials/sidebar_item.html b/layouts/partials/sidebar_item.html
index 570d790..3971017 100644
--- a/layouts/partials/sidebar_item.html
+++ b/layouts/partials/sidebar_item.html
@@ -1,3 +1,3 @@
<div class="col">
{{ .Content }}
-</div> \ No newline at end of file
+</div>
diff --git a/layouts/partials/subfooter_container.html b/layouts/partials/subfooter_container.html
index b6f2f11..9aec33a 100644
--- a/layouts/partials/subfooter_container.html
+++ b/layouts/partials/subfooter_container.html
@@ -11,8 +11,9 @@
{{ range sort $subfooterItems.Resources "Name" }}
{{ partial "subfooter_item.html" . }}
{{ end }}
- {{ end }}
-
+ {{ else if .Site.Params.Theme.Subfooter.demoContent }}
+ {{ safeHTML .Site.Params.Theme.Subfooter.demoContent }}
+ {{ end}}
</div>
</div>
diff --git a/theme.toml b/theme.toml
index bf48a3e..f54f8bf 100644
--- a/theme.toml
+++ b/theme.toml
@@ -1,6 +1,6 @@
# Name : Tikva
-# Version : 0.2.4
-# Released : 2019-07-26
+# Version : 0.2.5
+# Released : 2019-08-28
name = "Tikva"
license = "MIT"