Theme working on localhost, but not in GitHub pages

Set the baseURL in your site configuration to the URL of your production site.

baseURL = 'https://vitor-mafra.github.io/about_me/'

Remove these:

canonifyURLs = true       # see docs: https://gohugo.io/content-management/urls/#canonical-urls
relativeURLs = true       # see docs: https://gohugo.io/content-management/urls/#relative-urls
PygmentsCodeFences = true # this is superfluous; it is the same as the default value
PygmentsStyle = "monokai" # this is superfluous; it is the same as the default value
paginate = 10             # this is superfluous; it is the same as the default value

Add this:

[markup.goldmark.renderHooks.image]
enableDefault = true

[markup.goldmark.renderHooks.link]
enableDefault = true

See https://discourse.gohugo.io/t/markdown-style-images-with-full-path-when-baseurl-includes-subdirectory/52487/2

1 Like