In order to add a logo Next to the web site name, we need to modify the base template file of the theme and add an <img src="URL"> with URL pointing to our logo file.
Modifying the base template
Open the base.html template file located in the theme folder under themes/elegant/templates/base.html.
Search for the {{ SITENAME }} variable in the <body> and add this block inside the same <a> tag :
1 2 3 | |
At the end, you should have something like this :
1 2 3 4 5 6 7 8 | |
Now, in order to load the logo image, modify Pelican's config file pelicanconf.py by adding DISPLAY_LOGO_ON_TITLE with the URL of the logo file on the output folder :
1 | |
Rebuild the site and serve it. Now you can go check http://localhost:8000 to see your brand new logo.
$ invoke clean
$ invoke build
$ invoke serve
The logo is clickable and it should redirect to the home page like what the title does.