Allow site title to be customised via parital (#384)
* Allow site title to be customised via parital * Modify readme to highlight available partials * Rename template for consistency * Move title tags to head partial
This commit is contained in:
parent
f2fb37b1ad
commit
9d4916fcc2
3 changed files with 7 additions and 4 deletions
|
@ -264,9 +264,11 @@ bookSearchExclude = true
|
|||
|
||||
### Partials
|
||||
|
||||
There are few empty partials you can override in `layouts/partials/`
|
||||
There are layout partials available for you to easily override components of the theme in `layouts/partials/`.
|
||||
|
||||
| Partial | Placement |
|
||||
In addition to this, there are several empty partials you can override to easily add/inject code.
|
||||
|
||||
| Empty Partial | Placement |
|
||||
| -------------------------------------------------- | ------------------------------------------- |
|
||||
| `layouts/partials/docs/inject/head.html` | Before closing `<head>` tag |
|
||||
| `layouts/partials/docs/inject/body.html` | Before closing `<body>` tag |
|
||||
|
|
1
layouts/partials/docs/html-head-title.html
Normal file
1
layouts/partials/docs/html-head-title.html
Normal file
|
@ -0,0 +1 @@
|
|||
{{ partial "docs/title" . }} | {{ .Site.Title -}}
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
{{- template "_internal/opengraph.html" . -}}
|
||||
|
||||
<title>{{ partial "docs/title" . }} | {{ .Site.Title -}}</title>
|
||||
<title>{{ partial "docs/html-head-title" . }}</title>
|
||||
|
||||
{{- $manifest := resources.Get "manifest.json" | resources.ExecuteAsTemplate "manifest.json" . }}
|
||||
<link rel="manifest" href="{{ $manifest.RelPermalink }}">
|
||||
|
|
Loading…
Reference in a new issue