docs: example to show separate logo file on subpages #969
Some checks are pending
docs-build-deployment / Run deploy (push) Waiting to run
docs-build / Run build (push) Waiting to run

This commit is contained in:
Sören Weber 2024-12-30 20:44:16 +01:00
parent 49b2f8f770
commit d9152f9aba
No known key found for this signature in database
GPG key ID: BEC6D55545451B6D
4 changed files with 16 additions and 2 deletions

View file

@ -4,6 +4,7 @@
baseURL = 'https://example.com/'
# 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
# to false
relativeURLs = true # true -> rewrite all site-relative URLs (those with a leading slash) to be relative to the current content

View file

@ -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!
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>
````

View file

@ -1 +1 @@
7.2.1+d25f856477223170b0de0b284252aa54b3e6255b
7.2.1+49b2f8f770804e95af85e2dfdb515518b4f46821