EmielH / tale-hugo

A port of the Tale theme for Hugo. Tale is a minimal theme curated for storytellers.
https://themes.gohugo.io/tale-hugo/
MIT License
248 stars 121 forks source link

Configuration Questions? #22

Closed ian-battaglia closed 5 years ago

ian-battaglia commented 5 years ago

Hi there! Really lovely work. I've used this theme to deploy a blog I hope to build a literary journal around, but I'm a little confused on some of the configuration. I'm not sure if there's a better home for these questions, so I figured I'd post here. If you'd prefer I remove and contact you directly, let me know.

  1. I have a wordmark logo I made, is it possible to substitute that for the title in the header?
  2. I wrote an about page that's in my content directory, is it possible to hide that from the rest of the posts and only show on the about page?
  3. Where should I look to configure the footer? I was looking through the layouts and partials folders, but I couldn't exactly tell what should be modified.
  4. Finally, for pagination, how can I change the limit from 5 posts per page, to 10?

Thanks so much!

EmielH commented 5 years ago

Hi @MoreThanLuck, no problem to pose questions here!

As a general remark: it is possible to override any of the theme's files by creating a file with the same name in your own project. So, from the root of your site, if you create a file named layouts/partials/header.html, Hugo will use that file instead of the one provided with the theme. This allows you to do some customisations especially for your site. The upside to this is that you do not have to alter the theme to do these kinds of customisations. However, if the file that comes with the theme is updated, your site will of course not have those updates.

  1. This is possible by copying layouts/partials/header.html file to your own project. On line 4, replace {{ .Site.Title }} with the img tag to your image. You may have to do some additional styling.
  2. The about page should reside in content/about/_index.md and then it should not show up in the list of posts.
  3. The footer is in layouts/partials/footer.html. It contains the copyright, the site author, and the generator text. This text is translated into several languages. The files for this reside in the i18n folder. Look for [generator] in these files to find the text in different languages. As far as I know, you can also override this file by adding an i18n folder to your own site.
  4. I think you can add paginate = 10 to your config.toml. I haven't tested this myself, but I got the information from the Hugo documentation.
ian-battaglia commented 5 years ago

Thanks so much Emiel! I've added these changes and am now just waiting for them to propagate to the website.

ian-battaglia commented 5 years ago

Hmm, I'm still having trouble adding the wordmark to my header.

  1. I've copied the layouts/partials/header.html from the theme directory into the same path on my own.
  2. I've got a few different sizes and formats of the wordmark I'd intended to try out, in ~/static/uploads/, some PNGs and one SVG, between 50-100 px tall.
  3. Whenever I go to make the suggested change in the layouts/partials/header.html file, it breaks everything and hugo server no longer resolves.

This is also happening with the footer changes I've tried to make, wherein I just rewrote the file as a piece of static html. Everything else worked great! Any ideas?

EmielH commented 5 years ago
  1. Whenever I go to make the suggested change in the layouts/partials/header.html file, it breaks everything and hugo server no longer resolves.

What do you mean by "no longer resolves"? Is there an error message on the console or on the screen?

ian-battaglia commented 5 years ago

Yes, sorry. It breaks the site on Hugo server and also my netlify deployment. Are you able to replace the title with an image?

Maybe the code I'm writing is wrong; how should it look?

EmielH commented 5 years ago

My first idea would be to change this line to:

<h2 class="nav-title"><img src="images/title.png" alt="{{ .Site.Title }}" /></h2>

And then of course alter the images/title.png to the path to your actual image. I have to admit that I didn't have the time to test this yet, but this would be the first thing I'd try/

EmielH commented 5 years ago

I'm closing this issue because there has been no activity for a while. If you still want to respond, feel free to reopen it!