Sections
This commit is contained in:
parent
94f6117c85
commit
ac8085609f
16
README.md
16
README.md
|
@ -8,8 +8,6 @@ It pairs a prominent sidebar with uncomplicated content.
|
||||||
- [Hydden](#hydden)
|
- [Hydden](#hydden)
|
||||||
- [Contents](#contents)
|
- [Contents](#contents)
|
||||||
- [Installation](#installation)
|
- [Installation](#installation)
|
||||||
- [Quick Start](#quick-start)
|
|
||||||
- [Standard Installation](#standard-installation)
|
|
||||||
- [Options](#options)
|
- [Options](#options)
|
||||||
- [Sidebar menu](#sidebar-menu)
|
- [Sidebar menu](#sidebar-menu)
|
||||||
- [Sticky sidebar content](#sticky-sidebar-content)
|
- [Sticky sidebar content](#sticky-sidebar-content)
|
||||||
|
@ -25,20 +23,10 @@ It pairs a prominent sidebar with uncomplicated content.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
### Quick Start
|
To install Hydden as your default theme, first install this repository in the `themes/` directory:
|
||||||
|
|
||||||
To give you a running start this installation puts a fully configured [starter repo](https://github.com/forestryio/hyde-hugo-starter) into your Git account and sets it up in a content manager / CMS.
|
|
||||||
|
|
||||||
_[Forestry](https://forestry.io) Starter-Kit:_
|
|
||||||
|
|
||||||
[![Import this project into Forestry](https://assets.forestry.io/import-to-forestry.svg)](https://app.forestry.io/quick-start?repo=forestryio/hyde-hugo-starter&provider=github&engine=hugo&version=0.49)
|
|
||||||
|
|
||||||
### Standard Installation
|
|
||||||
|
|
||||||
To install Hyde as your default theme, first install this repository in the `themes/` directory:
|
|
||||||
|
|
||||||
$ cd themes/
|
$ cd themes/
|
||||||
$ git clone https://github.com/spf13/hyde.git
|
$ git clone <here>
|
||||||
|
|
||||||
Second, specify `hydden` as your default theme in the `config.toml` file. Just add the line
|
Second, specify `hydden` as your default theme in the `config.toml` file. Just add the line
|
||||||
|
|
||||||
|
|
|
@ -231,8 +231,7 @@ tbody tr:nth-child(odd) td, tbody tr:nth-child(odd) th
|
||||||
margin: .2em
|
margin: .2em
|
||||||
|
|
||||||
/* Table of contents */
|
/* Table of contents */
|
||||||
// TODO: float
|
.toc, .sections
|
||||||
.toc
|
|
||||||
font-size: $smaller
|
font-size: $smaller
|
||||||
a
|
a
|
||||||
color: $color-grey
|
color: $color-grey
|
||||||
|
|
|
@ -11,3 +11,9 @@
|
||||||
{{- end }}
|
{{- end }}
|
||||||
</ul>
|
</ul>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{ define "note" -}}
|
||||||
|
<nav class="sections">
|
||||||
|
{{ partial "sections.html" . }}
|
||||||
|
</nav>
|
||||||
|
{{- end }}
|
|
@ -38,3 +38,9 @@
|
||||||
{{ partial "pagination.html" . }}
|
{{ partial "pagination.html" . }}
|
||||||
</div>
|
</div>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
|
{{ define "note" -}}
|
||||||
|
<nav class="sections">
|
||||||
|
{{ partial "sections.html" . }}
|
||||||
|
</nav>
|
||||||
|
{{- end }}
|
|
@ -0,0 +1,14 @@
|
||||||
|
{{ template "sectionsnav" . }}
|
||||||
|
{{ define "sectionsnav" }}
|
||||||
|
{{ $sec := where .Sections ".Params.unlisted" "!=" "true" }}
|
||||||
|
{{ if gt (len $sec) 0 }}
|
||||||
|
<ul>
|
||||||
|
{{ range $sec }}
|
||||||
|
<li>
|
||||||
|
<a href="{{ .Permalink }}">{{ .Title }}</a>
|
||||||
|
{{ template "sectionsnav" . }}
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
{{ end }}
|
||||||
|
{{ end }}
|
Loading…
Reference in New Issue