diff options
author | Julian <julian@vantage-design.com> | 2020-05-11 22:45:13 +0300 |
---|---|---|
committer | Julian <julian@vantage-design.com> | 2020-05-11 22:45:13 +0300 |
commit | fef8d9978c2418740faab19e7a34951068ac4838 (patch) | |
tree | f0b853e82384517d010260ea7b9cb921fbfd2823 | |
parent | e71324bba7b85db0a617468fff9112a29f0a72ba (diff) |
Allow disabling read more nav and extended config docs
-rw-r--r-- | exampleSite/content/configuration/_index.md | 23 | ||||
-rw-r--r-- | layouts/_default/baseof.html | 4 | ||||
-rw-r--r-- | layouts/partials/next-prev-page.html | 15 |
3 files changed, 32 insertions, 10 deletions
diff --git a/exampleSite/content/configuration/_index.md b/exampleSite/content/configuration/_index.md index 54665a3..dd05a47 100644 --- a/exampleSite/content/configuration/_index.md +++ b/exampleSite/content/configuration/_index.md @@ -8,6 +8,12 @@ weight = 2 Customize and tweak Ace using a number of configuration options. {{< /lead >}} + +## Page ordering + +By default, pages are sorted on the weight assigned to them in their <code>frontmatter</code>. This is set in <code>config.toml</code>, using <code>orderSectionsby = "weight"</code>. Change this to <code>"title"</code> to sort pages alphabetically based on their title instead. Alternatively, do not assign a weight to any pages and it will also sort them alphabetically on their title. + + ## Table of contents By default, a table of contents (ToC) is generated for each page in the right side menu. This can be disabled using: @@ -18,3 +24,20 @@ toc = false in the <code>config.toml</code> or the <code>frontmatter</code> (a page's markdown file) for a page-wide or page-specific disabling of the ToC respectively. +## Google Analytics + +Enable Google Analytics by adding your GA tracking ID to the <code>config.toml</code> file, at: +{{< code >}} +googleAnalytics = "XX-XXXXXXXXX-X" +{{< /code >}} +Where <code>XX-XXXXXXXXX-X</code> is your tracking ID. + + +## Read more navigation + +In <code>config.toml</code> or a page's <code>frontmatter</code>, set <code>disableReadmoreNav = true</code> to disable the prev/next buttons at the buttom of every page. + + +## Search + +Disable search by setting <code>disableSearch = true</code> in <code>config.toml</code>.
\ No newline at end of file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 1b905af..6db8cae 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -24,11 +24,11 @@ {{- block "main" . }}{{- end }} <div class="row"> - + {{- if and (ne .Site.Params.disableReadmoreNav true) (ne .Params.disableReadmoreNav true) -}} <div class="position-relative mx-auto col-lg-9"> {{ partial "next-prev-page.html" . }} </div> - + {{- end -}} </div> <!-- /end of row --> </div> diff --git a/layouts/partials/next-prev-page.html b/layouts/partials/next-prev-page.html index 5a84b3a..ae0f548 100644 --- a/layouts/partials/next-prev-page.html +++ b/layouts/partials/next-prev-page.html @@ -36,13 +36,12 @@ {{- end -}} <div class="d-flex justify-content-center"> - {{- if not $.Site.Params.disableNavChevron -}} - {{- with ($.Scratch.Get "prevPage") -}} - <a class="p-1 mr-3 d-inline-block text-white" href="{{.RelPermalink}}" title="{{.Title}}"><i class="fas fa-chevron-left p-1"></i>{{.Title}}</a> - {{ end -}} - {{- with ($.Scratch.Get "nextPage") -}} - <a class="p-1 ml-3 d-inline-block text-white text-right" href="{{.RelPermalink}}" title="{{.Title}}">{{.Title}}<i class="fas fa-chevron-right p-1"></i></a> - {{- end }} - {{- end -}} + {{- with ($.Scratch.Get "prevPage") -}} + <a class="p-1 mr-3 d-inline-block text-white" href="{{.RelPermalink}}" title="{{.Title}}"><i class="fas fa-chevron-left p-1"></i>{{.Title}}</a> + {{ end -}} + {{- with ($.Scratch.Get "nextPage") -}} + <a class="p-1 ml-3 d-inline-block text-white text-right" href="{{.RelPermalink}}" title="{{.Title}}">{{.Title}}<i class="fas fa-chevron-right p-1"></i></a> + {{- end }} </div> </div> + |