mirror of
https://github.com/McShelby/hugo-theme-relearn.git
synced 2025-01-18 02:40:24 +00:00
docs: example to show separate logo file on subpages #969
This commit is contained in:
parent
49b2f8f770
commit
d9152f9aba
4 changed files with 16 additions and 2 deletions
|
@ -4,6 +4,7 @@
|
||||||
baseURL = 'https://example.com/'
|
baseURL = 'https://example.com/'
|
||||||
|
|
||||||
# required value to serve this page from a webserver AND the file system;
|
# required value to serve this page from a webserver AND the file system;
|
||||||
|
# if you set this value to `true`, `baseURL` must not contain a subdirectory;
|
||||||
# if you don't want to serve your page from the file system, you can also set this value
|
# if you don't want to serve your page from the file system, you can also set this value
|
||||||
# to false
|
# to false
|
||||||
relativeURLs = true # true -> rewrite all site-relative URLs (those with a leading slash) to be relative to the current content
|
relativeURLs = true # true -> rewrite all site-relative URLs (those with a leading slash) to be relative to the current content
|
||||||
|
|
|
@ -26,3 +26,16 @@ By default, only your site title will be shown at the top of the menu. You can [
|
||||||
Create a new file in `layouts/partials/logo.html` of your site. Then write any HTML you want. You could use an `img` HTML tag and reference an image, or you could paste an SVG definition!
|
Create a new file in `layouts/partials/logo.html` of your site. Then write any HTML you want. You could use an `img` HTML tag and reference an image, or you could paste an SVG definition!
|
||||||
|
|
||||||
The size of the logo will adapt automatically.
|
The size of the logo will adapt automatically.
|
||||||
|
|
||||||
|
> [!note]
|
||||||
|
> In case of SVGs, additional styling may be required.
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
Suppose you've stored your logo as `static/images/logo.png` then your `layouts/partials/logo.html` could look something like this:
|
||||||
|
|
||||||
|
````html {title="layouts/partials/logo.html"}
|
||||||
|
<a id="R-logo" href="{{ partial "permalink.gotmpl" (dict "to" .Site.Home) }}">
|
||||||
|
<img src="{{"images/logo.png" | relURL}}" alt="brand logo">
|
||||||
|
</a>
|
||||||
|
````
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
<a id="R-logo" class="R-default" href="{{ partial "permalink.gotmpl" (dict "to" .Site.Home) }}">
|
<a id="R-logo" class="R-default" href="{{ partial "permalink.gotmpl" (dict "to" .Site.Home) }}">
|
||||||
{{ .Site.Params.linkTitle | default .Site.Title }}
|
{{ .Site.Params.linkTitle | default .Site.Title }}
|
||||||
</a>
|
</a>
|
|
@ -1 +1 @@
|
||||||
7.2.1+d25f856477223170b0de0b284252aa54b3e6255b
|
7.2.1+49b2f8f770804e95af85e2dfdb515518b4f46821
|
Loading…
Reference in a new issue