Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Logo of institute in the navbar #11

Closed
AndreaCallia opened this issue Dec 4, 2018 · 3 comments
Closed

Logo of institute in the navbar #11

AndreaCallia opened this issue Dec 4, 2018 · 3 comments

Comments

@AndreaCallia
Copy link

Hi @ankitsultana and all,

does the theme provide a way to also put a logo of the institute in the navbar?

For example, by putting some specific item under nav:?

Many thanks for your work...

@ankitsultana
Copy link
Owner

At the moment, the answer is no. This could be thought of as an enhancement. I will look at this over the weekend.

@AndreaCallia
Copy link
Author

AndreaCallia commented Dec 7, 2018

In the mean time I have found a workaround made of two main changes.

In _config.yml I set the title as below.

 title: "<img src=logo.jpg><br />Name Surname"

And, in order to avoid putting the HTML tags in the <title> tag, I use strip_html in liquid as shown below in the default.html file.

<title>{% if page.title %}{{ page.title | strip_html }}{% else %}{{ site.title | strip_html }}{% endif %}</title>

In _config.yml you can also nest the <img> tag into a <a> tag if you want the logo to be a link to the institute (otherwise it would point to your index.html page as it is inside the title field). Again, thanks to strip_html the <a> tag will also be filtered out when generating the <title> tag.

I hope this helps.

PS @ankitsultana If you are too busy to make better improvements, you can modify your default.html file as I did, and you can add to your README.md the above instructions to add the logo in the title: field of _config.yml.

@ankitsultana
Copy link
Owner

I have added support for the institute logo at the top. Check out the README for more info.

jrzech added a commit to jrzech/jrzech.github.io that referenced this issue Apr 6, 2021
Closes: ankitsultana#11 | Adds support for institute logo at the top
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants