Logos and Images
Add your logo
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 site parameter
navbar_logo
to false
in your project’s config:
[params.ui]
navbar_logo = false
params:
ui:
navbar_logo: false
{
"params": {
"ui": {
"navbar_logo": false
}
}
}
For information about styling your logo, see Styling your project logo and name.
Use icons
Docsy includes the free FontAwesome icons by default, including logos for sites
like GitHub and Stack Overflow. You can view all available icons in the
FontAwesome documentation, including the
FontAwesome version when the icon was added and whether it is available for free
tier users. Check Docsy’s
package.json
and
release notes for Docsy’s currently included version of FontAwesome.
You can add FontAwesome icons to your top-level menu, section menu, or anywhere in your text.
Add your favicons
The easiest way to do this is to create a set of favicons via
https://cthedot.de/icongen (which lets you create a huge range of icon sizes and
options from a single image) and/or https://favicon.io,
and put them in your site project’s static/favicons
directory. This will
override the default favicons from the theme.
Note that https://favicon.io doesn’t create as wide a range of sizes as Icongen
but does let you quickly create favicons from text: if you want to create text
favicons you can use this site to generate them, then use Icongen to create more
sizes (if necessary) from your generated .png
file.
If you have special favicon requirements, you can create your own
layouts/_partials/favicons.html
with your links.
Add images
Landing pages
Docsy’s blocks/cover
shortcode
make it easy to add large cover images to your landing pages. The shortcode
looks for an image with the word “background” in the name inside the landing
page’s Page Bundle - so,
for example, if you’ve copied the example site, the landing page image in
content/en/_index.html
is content/en/featured-background.jpg
.
You specify the preferred display height of a cover block container (and hence
its image) using the block’s height
parameter. For a full viewport height, use
full
:
{{< blocks/cover title="Welcome to the Docsy Example Project!" image_anchor="top" height="full" >}}
...
{{< /blocks/cover >}}
For a shorter image, as in the example site’s About page, use one of min
,
med
, max
or auto
(the actual height of the image):
{{< blocks/cover title="About the Docsy Example" image_anchor="bottom" height="min" >}}
...
{{< /blocks/cover >}}
Other pages
To add inline images to other pages, use the
imgproc
shortcode. Alternatively,
if you prefer, just use regular Markdown or HTML images and add your image files
to your project’s static
directory. You can find out more about using this
directory in
Adding static content.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.