Github Pages Rendering

Theme: hugoplate

Repo: GitHub - kode-monki/btc-hugo

hugo v0.155.2-d8c0dfccf72ab43db2b2bca1483a61c8660021d9+extended windows/amd64 BuildDate=2026-02-02T10:04:51Z VendorInfo=gohugoio

When I run hugo:

Start building sites …
hugo v0.155.2-d8c0dfccf72ab43db2b2bca1483a61c8660021d9+extended windows/amd64 BuildDate=2026-02-02T10:04:51Z VendorInfo=gohugoio

              │ EN 

──────────────────┼────
Pages            │ 39
Paginator pages  │  0
Non-page files   │  0
Static files     │  4
Processed images │ 34
Aliases          │  0
Cleaned          │  0

Total in 1014 ms

I’ve read through several other threads about this, and documentation, and AI, so I’m back here, posting my own.

I’ve tried pushing code after ‘hugo server
baseURL = "``https://kode-monki.github.io/btc-hugo/``"

and

baseURL = "``https://kode-monki.github.io/btc-hugo``",

but both have the same issues of rendering all the not generated links at GitHub Pages | Websites for you and your projects, hosted directly from your GitHub repository. Just edit, push, and your changes are live. , ignoring the repo

Then I read I should try just hugo, and now NO CSS files are found.

I’m using the Github action that comes with Hugoplate go create a Github Page

Works beautifully on my machine, but something is getting lost in the rendering.

I do not understand the problem.

What is broken?

The style paths don’t render correctly when I push a build from “hugo"

The link paths don’t render correctly when I push a build from “hugo server” (the hugo-built ones do, but not if I write something like <a href="z/y.html">x</a>, on GitHub that ignores the base URL that includes the repo name

You have two project configuration files. In config/_default/hugo.toml you have set the baseURL is set to /.

You may have other problems too, but let’s start with the obvious.

Thank you! Didn’t even notice.

I set the baseURL (and everything else) the same in config/_default/hugo.toml as in /config/hugo.toml

I also changed the name of the folder where everything to the same name as the GitHub repo.

Now running hugo server shows me the broken interface:

Your configuration is still a bit of a mess:

  • config/_default/hugo.toml
  • config/development/server.toml
  • config/production/hugo.toml
  • hugo.toml

I suggest you consolidate… unless you need different configuration for your production and server environments, which you don’t, consolidate everything into the first file, and delete the others.

In the first one you have this:

relativeURLs = true
canonifyURLs = true

Delete that bit. They don’t do what you think they do, and the documentation contains warnings about each, advising you not to use them.

Add this in the appropriate place in the config:

[markup.goldmark.renderHooks.image]
useEmbedded = 'always'

[markup.goldmark.renderHooks.link]
useEmbedded = 'always'

Keep in mind that the best configuration file is the shortest configuration file that meets your needs; get rid of all the settings that don’t change the defaults, for example:

  • disableLanguages
  • hasCJKLanguage
  • defaultContentLanguage
  • defaultContentLanguageInSubdir
  • the entire services key
  • the entire pagination key
  • and there may be others

It also looks like you have directly modified some of the files in the themes directory, which isn’t a great idea. Instead of modifying theme files, override them by creating files with same path in your project directory (e.g., override themes/foo/layouts/page.html with layouts/page.html. That way you can update the theme without losing your changes.


After you have done all of the above, test again and come back here if you’re still having trouble.

2 Likes

Thank you! I cleaned it up a bit, but it didn’t work. So I looked at the original code from the repo I cloned and looked at links. They’re now formatted like this:

<a href="{{ `authors/` | relLangURL }}{{ .Params.author_id | urlize }}/" class="text-primary hover:underline">{{ .Params.author }}</a>

<a href="{{ (print "plenaries/" $targetYear "/" (.Params.plenary_id | urlize) "/") | relLangURL }}" class="text-primary hover:underline">

I am so thankful for your responses, as otherwise it’s unlikely I would’ve gone back to the beginning, and I’ve learned a lot along the way. I’m not sure which response made the difference, but here is my list of things to try:

  • fix the baseURL (hugoplate needs this in both /hugo.toml and /config/_default/hugo.toml (if you’re missing /hugo.toml, the GitHub action will fail)
  • look into this: urls.URLize
  • use whatever these are `
  • have the folder where you’re storing all the code the same name as the repo

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.