nanxstats / hugo-tanka

📝 A minimalist, text-oriented, and performant theme for Hugo/blogdown.
https://nanx.me/hugo-tanka/
GNU General Public License v3.0
83 stars 38 forks source link

No images showing in posts #5

Open blogdemoi opened 3 years ago

blogdemoi commented 3 years ago

Hi,

I would like to use your theme but when testing on my computer there are no images showing in my posts. All my images are in a static folder and I insert them with: ![sons xxx](/blog/wxxxxx.jpg)

What could be wrong?

My config.toml is:

baseURL = 'https://xxxx.org/blog/'
languageCode = 'en-us'
title = 'Mon blog'
author = "xxxx"
canonifyurls = true
languagecode = "en"
theme = "hugo-tanka"

enableEmoji = true
hasCJKLanguage = false

pygmentsstyle = "vs"
pygmentscodefences = true

ignoreFiles = ["\\.Rmd$", "\\.Rmarkdown$", "_cache$", "\\.knit\\.md$", "\\.utf8\\.md$"]

[params]
  sitename = "Hugo Tanka Theme"
  faviconfile = "images/favicon.png"
  highlightjs = true
  highlightjslanguages = ["r", "python", "stan"]
  uselatex = true
  progressively = false
# commentsrepo = "user/repo"

[markup]
  [markup.goldmark]
    [markup.goldmark.renderer]
      unsafe = true

[[menu.primary]]
    name = "Home"
    url = "/"
    weight = 1
[[menu.primary]]
    name = "About"
    url = "/about/"
    weight = 2
[[menu.primary]]
    name = "GitHub"
    url = "https://github.com/nanxstats"
    weight = 3
[[menu.primary]]
    name = "Twitter"
    url = "https://twitter.com/nanxstats"
    weight = 4
[[menu.primary]]
    name = "Subscribe"
    url = "/index.xml"
    weight = 5

Thank you.

nanxstats commented 3 years ago

So let's say the image path is static/image/example.png, then we should use this to include the image:

![title](/image/example.png)

This is demonstrated by the example site.