Update readme with main branch, update config examples (#771)
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
### [Hugo](https://gohugo.io) documentation theme as simple as plain book
|
||||
|
||||

|
||||

|
||||
|
||||
- [Features](#features)
|
||||
- [Requirements](#requirements)
|
||||
@@ -105,7 +105,7 @@ A blog is not the primary usecase of this theme, so it has only minimal features
|
||||
### Site Configuration
|
||||
|
||||
There are a few configuration options that you can add to your `hugo.toml` file.
|
||||
You can also see the `yaml` example [here](https://github.com/alex-shpak/hugo-book/blob/master/exampleSite/hugo.yaml).
|
||||
You can also see the `yaml` example [here](https://github.com/alex-shpak/hugo-book/blob/main/exampleSite/hugo.yaml).
|
||||
|
||||
```toml
|
||||
# (Optional) Set Google Analytics if you use it to track your website.
|
||||
@@ -272,10 +272,10 @@ To enable plugins, add `@import "plugins/{name}";` to `assets/_custom.scss` in y
|
||||
|
||||
There are a few hugo templates inserted in `<head>`
|
||||
|
||||
- [Google Analytics](https://gohugo.io/templates/internal/#google-analytics)
|
||||
- [Open Graph](https://gohugo.io/templates/internal/#open-graph)
|
||||
- [Google Analytics](https://gohugo.io/templates/embedded/#google-analytics)
|
||||
- [Open Graph](https://gohugo.io/templates/embedded/#open-graph)
|
||||
|
||||
To disable Open Graph inclusion you can create your own empty file `/layouts/_internal/opengraph.html`.
|
||||
To disable Open Graph inclusion you can create your own empty file `/layouts/partials/opengraph.html`.
|
||||
In fact almost empty not quite empty because an empty file looks like absent for HUGO. For example:
|
||||
```
|
||||
<!-- -->
|
||||
@@ -304,7 +304,7 @@ If you are using `config.yaml` or `config.json`, consult the [configuration mark
|
||||
|
||||
This theme follows a simple incremental versioning. e.g. `v1.0.0`, `v2.0.0` and so on. Releases will happen on breaking changes.
|
||||
|
||||
If you want lower maintenance, use one of the released versions. If you want to live on the bleeding edge of changes, you can use the `master` branch and update your website when needed.
|
||||
If you want lower maintenance, use one of the released versions. If you want to live on the bleeding edge of changes, you can use the `main` branch and update your website when needed, this also the default branch.
|
||||
|
||||
## Contributing
|
||||
|
||||
|
||||
+12
-5
@@ -1,5 +1,9 @@
|
||||
# hugo server --minify --themesDir ../..
|
||||
|
||||
# for maximum cleanups and rebuilds, run where you checked out the repository
|
||||
# hugo server --printPathWarnings --disableFastRender --cleanDestinationDir=true --logLevel=debug \
|
||||
# --gc -M -s exampleSite --themesDir ../.. -b http://127.0.0.1/
|
||||
|
||||
baseURL = 'http://0.0.0.0:1313/hugo-book/'
|
||||
title = 'Hugo Book'
|
||||
theme = 'hugo-book'
|
||||
@@ -86,7 +90,7 @@ enableGitInfo = true
|
||||
BookTheme = 'light'
|
||||
|
||||
# (Optional, default none) Controls table of contents visibility on right side of pages.
|
||||
# Start and end levels can be controlled with markup.tableOfContents setting.
|
||||
# Start and end levels can be controlled globally with markup.tableOfContents setting.
|
||||
# You can also specify this parameter per page in front matter.
|
||||
# BookToC = true
|
||||
|
||||
@@ -103,7 +107,8 @@ enableGitInfo = true
|
||||
# For backward compatibility you can set '*' to render all sections to menu. Acts same as '/'
|
||||
BookSection = 'docs'
|
||||
|
||||
# Here for backwar compatibility, not required.
|
||||
# Here for backward compatibility, not required.
|
||||
# It's here as an example how to use it with BookLastChangeLink or BookEditLink
|
||||
BookRepo = 'https://github.com/alex-shpak/hugo-book/'
|
||||
|
||||
# (Optional, default none) Set template for commit link for the page. Requires enableGitInfo.
|
||||
@@ -128,7 +133,7 @@ enableGitInfo = true
|
||||
BookSearch = true
|
||||
|
||||
# (Optional, default true) Enables comments template on pages
|
||||
# By default partals/docs/comments.html includes Disqus template
|
||||
# By default partials/docs/comments.html includes Disqus template
|
||||
# See https://gohugo.io/content-management/comments/#configure-disqus
|
||||
# Can be overwritten by same param in page frontmatter
|
||||
BookComments = true
|
||||
@@ -136,12 +141,14 @@ enableGitInfo = true
|
||||
# /!\ This is an experimental feature, might be removed or changed at any time
|
||||
# (Optional, experimental, default false) Enables portable links and link checks in markdown pages.
|
||||
# Portable links meant to work with text editors and let you write markdown without {{< relref >}} shortcode
|
||||
# Theme will print warning or error if page referenced in markdown does not exists.
|
||||
# Hugo Book will print warning or error if page referenced in markdown does not exists.
|
||||
# Possible values are false | 'warning' | 'error'
|
||||
BookPortableLinks = 'warning'
|
||||
|
||||
# /!\ This is an experimental feature, might be removed or changed at any time
|
||||
# (Optional, experimental, default false) Enables service worker that caches visited pages and resources for offline use.
|
||||
# (Optional, experimental, default false)
|
||||
# When set to 'preache' it enables a service worker that caches visited pages and resources for offline use.
|
||||
# Possible values are false | true | 'precache'
|
||||
BookServiceWorker = 'precache'
|
||||
|
||||
# /!\ This is an experimental feature, might be removed or changed at any time
|
||||
|
||||
+10
-5
@@ -1,5 +1,9 @@
|
||||
# hugo server --minify --themesDir ../..
|
||||
|
||||
# for maximum cleanups and rebuilds, run where you checked out the repository
|
||||
# hugo server --printPathWarnings --disableFastRender --cleanDestinationDir=true --logLevel=debug \
|
||||
# --gc -M -s exampleSite --themesDir ../.. -b http://127.0.0.1/
|
||||
|
||||
baseURL: http://0.0.0.0:1313/hugo-book/
|
||||
title: Hugo Book
|
||||
theme: hugo-book
|
||||
@@ -73,7 +77,7 @@ params:
|
||||
BookTheme: "light"
|
||||
|
||||
# (Optional, default none) Controls table of contents visibility on right side of pages.
|
||||
# Start and end levels can be controlled with markup.tableOfContents setting.
|
||||
# Start and end levels can be controlled globally with markup.tableOfContents setting.
|
||||
# You can also specify this parameter per page in front matter.
|
||||
# BookToC: true
|
||||
|
||||
@@ -112,7 +116,7 @@ params:
|
||||
BookSearch: true
|
||||
|
||||
# (Optional, default true) Enables comments template on pages
|
||||
# By default partals/docs/comments.html includes Disqus template
|
||||
# By default partials/docs/comments.html includes Disqus template
|
||||
# See https://gohugo.io/content-management/comments/#configure-disqus
|
||||
# Can be overwritten by same param in page frontmatter
|
||||
BookComments: true
|
||||
@@ -120,13 +124,14 @@ params:
|
||||
# /!\ This is an experimental feature, might be removed or changed at any time
|
||||
# (Optional, experimental, default false) Enables portable links and link checks in markdown pages.
|
||||
# Portable links meant to work with text editors and let you write markdown without {{< relref >}} shortcode
|
||||
# Theme will print warning or error if page referenced in markdown does not exists.
|
||||
# Hugo Book will print warning or error if page referenced in markdown does not exists.
|
||||
# Possible values are false | 'warning' | 'error'
|
||||
BookPortableLinks: 'warning'
|
||||
|
||||
# /!\ This is an experimental feature, might be removed or changed at any time
|
||||
# (Optional, experimental, default false) Enables service worker that caches visited pages and resources for offline use.
|
||||
# can be false, true or 'precache', precache will try to download all content pages on install.
|
||||
# (Optional, experimental, default false)
|
||||
# When set to 'preache' it enables a service worker that caches visited pages and resources for offline use.
|
||||
# Possible values are false | true | 'precache'
|
||||
BookServiceWorker: "precache"
|
||||
|
||||
# /!\ This is an experimental feature, might be removed or changed at any time
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
<!-- This partial can be replaced to support other commenting engines -->
|
||||
{{ template "_internal/disqus.html" . }}
|
||||
{{ partial "disqus.html" . }}
|
||||
|
||||
@@ -14,7 +14,7 @@ https://github.com/alex-shpak/hugo-book
|
||||
<meta http-equiv="Refresh" content="0; url='{{ . }}'" />
|
||||
{{- end -}}
|
||||
|
||||
{{- template "_internal/opengraph.html" . -}}
|
||||
{{ partial "opengraph.html" . }}
|
||||
|
||||
<title>{{ partial "docs/html-head-title" . }}</title>
|
||||
{{ partial "docs/html-head-favicon" . }}
|
||||
@@ -45,7 +45,7 @@ https://github.com/alex-shpak/hugo-book
|
||||
<script defer src="{{ $swJS.RelPermalink }}" {{ template "integrity" $swJS }}></script>
|
||||
{{ end -}}
|
||||
|
||||
{{- template "_internal/google_analytics.html" . -}}
|
||||
{{ partial "google_analytics.html" . }}
|
||||
|
||||
<!-- RSS -->
|
||||
{{- with .OutputFormats.Get "rss" -}}
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@
|
||||
</article>
|
||||
{{ end }}
|
||||
|
||||
{{ template "_internal/pagination.html" . }}
|
||||
{{ partial "pagination.html" . }}
|
||||
{{ end }}
|
||||
|
||||
{{ define "toc-container" }}
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
|
||||
name = "Book"
|
||||
license = "MIT"
|
||||
licenselink = "https://github.com/alex-shpak/hugo-book/blob/master/LICENSE"
|
||||
licenselink = "https://github.com/alex-shpak/hugo-book/blob/main/LICENSE"
|
||||
description = "Hugo documentation theme as simple as plain book"
|
||||
homepage = "https://github.com/alex-shpak/hugo-book"
|
||||
demosite = "https://hugo-book-demo.netlify.app"
|
||||
|
||||
Reference in New Issue
Block a user