From d9152f9abaf57fec38d9a8ede67ebbf94303b9e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=B6ren=20Weber?= Date: Mon, 30 Dec 2024 20:44:16 +0100 Subject: [PATCH] docs: example to show separate logo file on subpages #969 --- exampleSite/config/_default/hugo.toml | 1 + .../configuration/branding/logo/_index.en.md | 13 +++++++++++++ layouts/partials/logo.html | 2 +- layouts/partials/version.txt | 2 +- 4 files changed, 16 insertions(+), 2 deletions(-) diff --git a/exampleSite/config/_default/hugo.toml b/exampleSite/config/_default/hugo.toml index 460c74a550..fc3e3fdcc6 100644 --- a/exampleSite/config/_default/hugo.toml +++ b/exampleSite/config/_default/hugo.toml @@ -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 diff --git a/exampleSite/content/configuration/branding/logo/_index.en.md b/exampleSite/content/configuration/branding/logo/_index.en.md index 5bed32a2ae..17cf402ef2 100644 --- a/exampleSite/content/configuration/branding/logo/_index.en.md +++ b/exampleSite/content/configuration/branding/logo/_index.en.md @@ -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"} + +```` diff --git a/layouts/partials/logo.html b/layouts/partials/logo.html index bd4be70bac..605ee994a4 100644 --- a/layouts/partials/logo.html +++ b/layouts/partials/logo.html @@ -1,3 +1,3 @@ \ No newline at end of file diff --git a/layouts/partials/version.txt b/layouts/partials/version.txt index d700eb38a4..522aaece28 100644 --- a/layouts/partials/version.txt +++ b/layouts/partials/version.txt @@ -1 +1 @@ -7.2.1+d25f856477223170b0de0b284252aa54b3e6255b \ No newline at end of file +7.2.1+49b2f8f770804e95af85e2dfdb515518b4f46821 \ No newline at end of file