master
sheychen 2019-06-10 22:01:30 +02:00
parent 94f6117c85
commit ac8085609f
5 changed files with 29 additions and 16 deletions

View File

@ -8,8 +8,6 @@ It pairs a prominent sidebar with uncomplicated content.
- [Hydden](#hydden)
- [Contents](#contents)
- [Installation](#installation)
- [Quick Start](#quick-start)
- [Standard Installation](#standard-installation)
- [Options](#options)
- [Sidebar menu](#sidebar-menu)
- [Sticky sidebar content](#sticky-sidebar-content)
@ -25,20 +23,10 @@ It pairs a prominent sidebar with uncomplicated content.
## Installation
### Quick Start
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:
To install Hydden as your default theme, first install this repository in the `themes/` directory:
$ 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

View File

@ -231,8 +231,7 @@ tbody tr:nth-child(odd) td, tbody tr:nth-child(odd) th
margin: .2em
/* Table of contents */
// TODO: float
.toc
.toc, .sections
font-size: $smaller
a
color: $color-grey

View File

@ -11,3 +11,9 @@
{{- end }}
</ul>
{{- end }}
{{ define "note" -}}
<nav class="sections">
{{ partial "sections.html" . }}
</nav>
{{- end }}

View File

@ -38,3 +38,9 @@
{{ partial "pagination.html" . }}
</div>
{{- end }}
{{ define "note" -}}
<nav class="sections">
{{ partial "sections.html" . }}
</nav>
{{- end }}

View File

@ -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 }}