funkydan2 / hugo-kiera

Kiera - A Hugo Theme for writing
https://hugo-kiera.netlify.app
MIT License
71 stars 53 forks source link

Changing the Meta Description tag #41

Closed darshitpp closed 4 years ago

darshitpp commented 4 years ago

I recently deployed the blog and I noticed that the description generated in the index.html file is <meta name="description" content="The HTML5 Herald" />. Was wondering if it was this theme specific as I couldn't find anything similar in the Hugo forums.

Would appreciate if I get pointed to the relevant documentation where I could refer and change this.

funkydan2 commented 4 years ago

Oops - that shouldn't happen. It's a simple fix which I can push later today.

funkydan2 commented 4 years ago

Actually, it should happen if you haven't set Params.description in the config.

In exampleSite/config.toml it's line 29.

https://github.com/funkydan2/hugo-kiera/blob/3cc7926e90ec58f87c22b08948853beeac042dce/exampleSite/config.toml#L29

Can you check the description is set in your site's config file?

darshitpp commented 4 years ago

Okay, that works! This could have been added to the README to avoid confusion. Do you have any helpful links that I could look at to customize the theme more? (I want the links to stand out -- at the moment, they just look like plain text)

funkydan2 commented 4 years ago

Do you have any helpful links that I could look at to customize the theme more?

I'd recommend writing some custom CSS. If you put your CSS file in /static, then you can include it by setting .Params.customCSS in the config file.

https://github.com/funkydan2/hugo-kiera/blob/3cc7926e90ec58f87c22b08948853beeac042dce/exampleSite/config.toml#L31

darshitpp commented 4 years ago

Thanks! I did some custom tweaks to the theme. I also have implemented Disqus comments, but it's showing an icon like this

I was confused whether this is to be configured from the Disqus website or the theme as the documentation mentions there'd be a View Comments button.

Live site if you want: https://darshit.dev/posts/two-way-ssl-nginx/

funkydan2 commented 4 years ago

So it should show the icon and the words 'Add/View Comments'.

The code which builds this button is in the disqus.html partial: https://github.com/funkydan2/hugo-kiera/blob/3cc7926e90ec58f87c22b08948853beeac042dce/layouts/partials/disqus.html#L2

~I wonder if the words aren't displayed because of the language you've got set. The theme supports english and farsi - https://github.com/funkydan2/hugo-kiera/tree/master/i18n~ I've looked a bit closer at your site and can see that's not the issue. The only other thing I can think is that the commenting system was updated about 2 months ago - have you got the latest commits?

darshitpp commented 4 years ago

Yes I just cloned the theme about 2 weeks ago when I started experimenting with deploying the website. Nevertheless, I also updated the theme as per the command in the documentation: git submodule update --rebase --remote but I don't think there were any changes since 2 weeks

I also noticed that the generated footer html is

<button id="show-comments" style=""><i class="fa fa-comments"></i> </button>

whereas as per the disqus partials disqus.html it should be

<button id="show-comments" style="display: none;"><i class="fa fa-comments"></i> 

I also had a languageCode configured on the website (might have picked up from some tutorial for Hugo), but even disabling that does not help.

funkydan2 commented 4 years ago

So I found a small bug in the disqus.html partial - just a space in the wrong place. If you pull the latest commit the button should display the text.