allow nav title text
This commit is contained in:
parent
87e1a8608f
commit
ffdb78849e
11
README.md
11
README.md
|
@ -6,13 +6,15 @@ An accessibility-friendly Hugo theme, ported from the [original Cupper](https://
|
||||||
|
|
||||||
## Table of contents
|
## Table of contents
|
||||||
|
|
||||||
|
<!-- toc -->
|
||||||
|
|
||||||
- [Demo](#demo)
|
- [Demo](#demo)
|
||||||
- [Minimum Hugo version](#minimum-hugo-version)
|
- [Minimum Hugo version](#minimum-hugo-version)
|
||||||
- [Installation](#installation)
|
- [Installation](#installation)
|
||||||
- [Updating](#updating)
|
- [Updating](#updating)
|
||||||
- [Run example site](#run-example-site)
|
- [Run example site](#run-example-site)
|
||||||
- [Configuration](#configuration)
|
- [Configuration](#configuration)
|
||||||
- [Logo](#logo)
|
- [Nav Title or Logo](#nav-title-or-logo)
|
||||||
- [Favicons](#favicons)
|
- [Favicons](#favicons)
|
||||||
- [Shortcodes](#shortcodes)
|
- [Shortcodes](#shortcodes)
|
||||||
- [Syntax highlighting](#syntax-highlighting)
|
- [Syntax highlighting](#syntax-highlighting)
|
||||||
|
@ -24,6 +26,8 @@ An accessibility-friendly Hugo theme, ported from the [original Cupper](https://
|
||||||
- [Getting help](#getting-help)
|
- [Getting help](#getting-help)
|
||||||
- [Credits](#credits)
|
- [Credits](#credits)
|
||||||
|
|
||||||
|
<!-- tocstop -->
|
||||||
|
|
||||||
## Demo
|
## Demo
|
||||||
|
|
||||||
https://cupper-hugo-theme.netlify.com/
|
https://cupper-hugo-theme.netlify.com/
|
||||||
|
@ -60,9 +64,10 @@ hugo server --themesDir ../..
|
||||||
|
|
||||||
Copy `config.yaml` from the [`exampleSite`](https://github.com/zwbetz-gh/cupper-hugo-theme/tree/master/exampleSite), then edit as desired.
|
Copy `config.yaml` from the [`exampleSite`](https://github.com/zwbetz-gh/cupper-hugo-theme/tree/master/exampleSite), then edit as desired.
|
||||||
|
|
||||||
## Logo
|
## Nav Title or Logo
|
||||||
|
|
||||||
Place your SVG logo at `static/images/logo.svg`. If you don't provide a logo, then the default theme logo will be used.
|
- The `navTitleText` param will be checked in your config file. **If** this param exists, the text value will be used as the nav title
|
||||||
|
- **Otherwise**, a logo will be used as the nav title. Place your **SVG** logo at `static/images/logo.svg`. If you don't provide a logo, then the default theme logo will be used
|
||||||
|
|
||||||
## Favicons
|
## Favicons
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,8 @@ params:
|
||||||
showThemeSwitcher: true
|
showThemeSwitcher: true
|
||||||
defaultDarkTheme: false
|
defaultDarkTheme: false
|
||||||
moveFooterToHeader: false
|
moveFooterToHeader: false
|
||||||
logoAlt: "An alternative text description of the logo"
|
# navTitleText: Cupper Theme
|
||||||
|
logoAlt: An alternative text description of the logo
|
||||||
customCss:
|
customCss:
|
||||||
- css/custom_01.css
|
- css/custom_01.css
|
||||||
- css/custom_02.css
|
- css/custom_02.css
|
||||||
|
|
|
@ -6,9 +6,14 @@
|
||||||
href="{{ .Site.BaseURL }}"
|
href="{{ .Site.BaseURL }}"
|
||||||
aria-label="{{ .Site.Title }} home page"
|
aria-label="{{ .Site.Title }} home page"
|
||||||
>
|
>
|
||||||
|
{{ with .Site.Params.navTitleText }}
|
||||||
|
<h1>{{ . }}</h1>
|
||||||
|
{{ else }}
|
||||||
<img
|
<img
|
||||||
src="{{ "images/logo.svg" | relURL }}"
|
src="{{ "images/logo.svg" | relURL }}"
|
||||||
alt="{{ .Site.Params.logoAlt | default "Logo" }}">
|
alt="{{ .Site.Params.logoAlt | default "Logo" }}"
|
||||||
|
>
|
||||||
|
{{ end }}
|
||||||
</a>
|
</a>
|
||||||
<p class="library-desc">
|
<p class="library-desc">
|
||||||
{{ with .Site.Params.description }} {{ . | markdownify }} {{ end }}
|
{{ with .Site.Params.description }} {{ . | markdownify }} {{ end }}
|
||||||
|
|
BIN
static/.DS_Store
vendored
Normal file
BIN
static/.DS_Store
vendored
Normal file
Binary file not shown.
3
task_regen_toc.sh
Executable file
3
task_regen_toc.sh
Executable file
|
@ -0,0 +1,3 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
markdown-toc -i README.md
|
Loading…
Reference in New Issue
Block a user