Skip to content

Commit

Permalink
docs: add Logo, Favicon in Configurations (#37)
Browse files Browse the repository at this point in the history
* Add Configuration for Logo, Favicon.

---------

Co-authored-by: Xin <xin@imfing.com>
  • Loading branch information
Welding-Torch and imfing authored Sep 5, 2023
1 parent 939acc0 commit 6d00cb3
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions exampleSite/content/docs/guide/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,24 @@ There are different types of menu items:

These menu items can be sorted by setting the `weight` parameter.

### Logo and Title

To modify the default logo, edit `hugo.yaml` and add the path to your logo file under `static` directory.
Optionally, you can change the link that users are redirected to when clicking on your logo, as well as set the width & height of the logo in pixels.

```yaml {filename="hugo.yaml"}
params:
navbar:
displayTitle: true
displayLogo: true
logo:
path: images/logo.svg
dark: images/logo-dark.svg
link: /
width: 40
height: 20
```

## Sidebar

### Main Sidebar
Expand Down Expand Up @@ -137,3 +155,22 @@ copyright: "© 2023 YOUR TEXT HERE"
```

For your reference, an example [`i18n/en.yaml`](https://github.com/imfing/hextra/blob/main/i18n/en.yaml) file can be found in the GitHub repository. Additionally, you could use Markdown format in the copyright text.

## Others

### Favicon

To customize the [favicon](https://en.wikipedia.org/wiki/Favicon) for your site, place icon files under the `static` folder to override the default favicons from the theme:

```
static
├── android-chrome-192x192.png
├── android-chrome-512x512.png
├── apple-touch-icon.png
├── favicon-16x16.png
├── favicon-32x32.png
├── favicon-dark.svg
├── favicon.ico
├── favicon.svg
└── site.webmanifest
```

0 comments on commit 6d00cb3

Please sign in to comment.