jmfergeau / hugo.386

A port of BOOTSTRA.386 for Hugo (gitlab mirror)
Apache License 2.0
21 stars 15 forks source link

Tips for a newbie #2

Closed MrvKrt closed 2 years ago

MrvKrt commented 3 years ago

Hi, I really loved the theme. But I need help with a few things. First of all, I want to add a comment section under the posts. Also, want to add a picture in the posts, how can I do these? Much appreciated for help.

gitscosh commented 2 years ago

Pictures are easy. It's basic markdown. But, what's cool about Hugo is that you can use shortcode to add the images in your markdown and set various attributes like you would if using HTML. The Hugo docs website is the best place to look to get started.

A bit of advice with images: I found the best way to handle it is to put them in the static folder. Anything you put in the static folder acts as if it's in the root of your web site when you deploy it. So, if you make a folder called /img in the /static folder (/static/img) and pop your images in there, you can refer to them in your markdown files as /img/imagename.

As for adding comment sections, you can edit any of the templates in the theme if you know some HTML, CSS, and Javascript. Again, the Hugo docs site is the best place to get started. If you read some of the docs, you'll see that Hugo ships with support for Disqus out of the box. https://gohugo.io/content-management/comments/

DIsclaimer: not the developer, just someone who is learning Hugo and really likes it.