Updating documentation
This commit is contained in:
@@ -899,3 +899,31 @@ Hugo ships with internal templates for common metadata for sites: <https://gohug
|
|||||||
{{- template "_internal/schema.html" . -}}
|
{{- template "_internal/schema.html" . -}}
|
||||||
{{- template "_internal/twitter_cards.html" . -}}
|
{{- template "_internal/twitter_cards.html" . -}}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Navbar (active css) with bootstrap
|
||||||
|
|
||||||
|
<https://discourse.gohugo.io/t/another-way-to-make-a-menu-item-active/17029/21>
|
||||||
|
|
||||||
|
If using bootstrap and you want to apply the class `active` to a navbar item when it has been selected, you should add the following to the navbar:
|
||||||
|
|
||||||
|
```Hugo
|
||||||
|
<ul class="navbar-nav ml-auto">
|
||||||
|
{{- if .Site.Params.showLanguageSwitcher -}}
|
||||||
|
{{ partial "i18nlist.html" . }}
|
||||||
|
{{- end -}}
|
||||||
|
{{ with .Site.Menus.main }}
|
||||||
|
{{ range . }}
|
||||||
|
<li class="nav-item{{ if or (eq $current.URL .URL) ($current.HasMenuCurrent "main" .) }} active{{ end }}"><a class="nav-link" href="{{ .URL | relLangURL }}">{{ .Name }}</a></li>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
||||||
|
```
|
||||||
|
|
||||||
|
You should make sure in your `config.toml` that the navbar item url ends with a trailing `/`:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[[menu.main]]
|
||||||
|
identifier = "series"
|
||||||
|
name = "Series"
|
||||||
|
url = "/series/"
|
||||||
|
weight = 3
|
||||||
|
```
|
||||||
|
|||||||
@@ -14,16 +14,18 @@ Tasks:
|
|||||||
✔ Create a gulpfile to build the search index. @done (6/3/2020, 4:05:01 AM)
|
✔ Create a gulpfile to build the search index. @done (6/3/2020, 4:05:01 AM)
|
||||||
☐ Add matomo to project.
|
☐ Add matomo to project.
|
||||||
☐ Using archetypes.
|
☐ Using archetypes.
|
||||||
☐ Theme similar to forestry.
|
✔ Theme similar to forestry. @done (6/14/2020, 2:49:09 AM)
|
||||||
|
☐ Document making bavbar active (goes in the header.html or navbar) <https://discourse.gohugo.io/t/another-way-to-make-a-menu-item-active/17029/21> make sure in config.toml the url ends in /.
|
||||||
|
|
||||||
Theme:
|
Theme:
|
||||||
✔ Colour scheme (forestry) @done (6/9/2020, 12:24:25 PM)
|
✔ Colour scheme (forestry) @done (6/9/2020, 12:24:25 PM)
|
||||||
✔ Choose a Colour @done (6/9/2020, 12:24:26 PM)
|
✔ Choose a Colour @done (6/9/2020, 12:24:26 PM)
|
||||||
✔ Change link colour @done (6/9/2020, 12:24:25 PM)
|
✔ Change link colour @done (6/9/2020, 12:24:25 PM)
|
||||||
☐ Change post info colour
|
✔ Change post info colour @done (6/12/2020, 9:55:06 PM)
|
||||||
✔ Info, warning admonitions (using colour scheme) @done (6/9/2020, 12:24:29 PM)
|
✔ Info, warning admonitions (using colour scheme) @done (6/9/2020, 12:24:29 PM)
|
||||||
☐ Post layout
|
✔ Post layout @done (6/12/2020, 9:55:05 PM)
|
||||||
✔ TOC @done (6/9/2020, 12:24:31 PM)
|
✔ TOC @done (6/9/2020, 12:24:31 PM)
|
||||||
|
✔ Create a series admonition as a shortcode - use yellow. Include this in any series posts. @done (6/14/2020, 2:48:59 AM)
|
||||||
|
|
||||||
Search:
|
Search:
|
||||||
✔ Search bar like Font awesome @done (6/9/2020, 12:24:33 PM)
|
✔ Search bar like Font awesome @done (6/9/2020, 12:24:33 PM)
|
||||||
|
|||||||
@@ -40,7 +40,7 @@ Projects:
|
|||||||
Each series needs its own page with image and intro + TOC (https://simpleisbetterthancomplex.com/series/beginners-guide/1.11/)
|
Each series needs its own page with image and intro + TOC (https://simpleisbetterthancomplex.com/series/beginners-guide/1.11/)
|
||||||
Could have a banner or side content saying this is part N in a series?
|
Could have a banner or side content saying this is part N in a series?
|
||||||
Use this shortcode on pages in a series: <https://www.robinwieruch.de/webpack-eslint> - showing what part of N it is and of what series. Should dynamically show depending on whether it is a series or not.
|
Use this shortcode on pages in a series: <https://www.robinwieruch.de/webpack-eslint> - showing what part of N it is and of what series. Should dynamically show depending on whether it is a series or not.
|
||||||
☐ Have a categories taxonomy (https://www.integralist.co.uk/posts/static-search-with-lunr/ at the bottom)
|
✔ Have a categories taxonomy (https://www.integralist.co.uk/posts/static-search-with-lunr/ at the bottom) @done (6/11/2020, 11:20:04 PM)
|
||||||
Notes:
|
Notes:
|
||||||
Categories are high level: code, guides/tutorials, deployment etc
|
Categories are high level: code, guides/tutorials, deployment etc
|
||||||
Tags will be specifics: python, aws etc
|
Tags will be specifics: python, aws etc
|
||||||
|
|||||||
Reference in New Issue
Block a user