Skip to content

Commit

Permalink
Flip the default to show the logo by default
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin committed Oct 7, 2022
1 parent 5744ead commit 9d31ef8
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--
cSpell:ignore deining docsy gtag
cSpell:ignore deining docsy gtag lookandfeel
-->

# Changelog
Expand Down Expand Up @@ -29,6 +29,10 @@ notes][0.5.0]. **BREAKING CHANGES** are documented below.
- **[Upgraded FontAwesome][]** to v6.1.2 from v5. While many icons were renamed,
the v5 names will still work. For details about icon renames and more, see
[What's changed][].
- **Display logo by default**. Most projects show their logo in the navbar. In
support of this majority, Docsy now displays a logo by default. For details on
how to hide the logo (or your brand name), see [Styling your brand logo and
name][].
- **Navbar search-box** width is narrower, as a result of the FontAwesome (FA)
upgrade. You might notice other width changes of elements using FA icons and
the FA font.
Expand All @@ -43,6 +47,8 @@ notes][0.5.0]. **BREAKING CHANGES** are documented below.
[docsy as an npm package]:
https://www.docsy.dev/docs/get-started/other-options/#option-3-docsy-as-an-npm-package
[gtag.js]: https://support.google.com/analytics/answer/10220869
[styling your brand logo and name]:
/docs/adding-content/lookandfeel/#styling-your-brand-logo-and-name
[upgraded fontawesome]: https://fontawesome.com/docs/web/setup/upgrade/
[what's changed]: https://fontawesome.com/docs/web/setup/upgrade/whats-changed

Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<a class="navbar-brand" href="{{ .Site.Home.RelPermalink }}">
{{- /**/ -}}
<span class="navbar-brand__logo navbar-logo">
{{- if .Site.Params.ui.navbar_logo -}}
{{- if ne .Site.Params.ui.navbar_logo false -}}
{{ with resources.Get "icons/logo.svg" -}}
{{ ( . | minify).Content | safeHTML -}}
{{ end -}}
Expand Down
1 change: 0 additions & 1 deletion userguide/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ params:
sidebar_cache_limit: 10
breadcrumb_disable: false
sidebar_search_disable: false
navbar_logo: true
feedback:
enable: true
'yes': >-
Expand Down
7 changes: 5 additions & 2 deletions userguide/content/en/docs/adding-content/iconsimages.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ description: Add and customize logos, icons, and images in your project.

## Add your logo

Place your project logo in `assets/icons/logo.svg`. This overrides the default
Docsy logo in the theme. If you don't want a project logo, set `navbar_logo` to
By default, Docsy shows a site logo at the start of the navbar, that is, at the
extreme left. Place your project's SVG logo in `assets/icons/logo.svg`. This
overrides the default Docsy logo in the theme.

If you don't want a logo to appear in the navbar, then set `navbar_logo` to
`false` in your project's config:

{{< tabpane persistLang=false >}}
Expand Down

0 comments on commit 9d31ef8

Please sign in to comment.