I suspect that I must be doing something totally wrong in my usage of netlify.
I have built several websites locally, without any issue, with Hugo (using the
hugo command), but when I deploy them, though the build is successful, a number of things are not working.
Now that Hugo uses goldmark, it is possible to set the number of levels for the table of content.
I have, in my config.toml file:
[markup.tableOfContents] endLevel = 1 ordered = false startLevel = 1
and this works great locally: I only have the first level headers in my TOCs.
But when I deploy on netlify, I see all the TOC levels.
org-mode’s native support in Hugo through go-org works like a charm locally, but when I deploy on netlify, none of the org code (code block, links, etc.) is rendered (it shows verbatim).
- theme using make
One of the themes I use doesn’t simply run
hugo but a Makefile. While this worked well locally, it did not work on netlify (again, the build was successful, but layout files were not used). I fixed this by removing the Makefile, the theme.toml, the netlify.toml, etc. and having the theme built following a much simpler process.
With all these problems, it seems to me that I must be doing something wrong and I have no idea what.
I first made sure that it was not that I was using different versions of Hugo locally and on netlify by creating a netlify.toml file with:
[build] publish = "public" command = "hugo" [context.production.environment] HUGO_VERSION = "0.63.2"
This made no difference.
I think that I need a little help here.
Here is one of these sites (in a very early draft stage).
On this page, which I built from a markdown file, you can see the TOC issue (locally, I only have the 1st levels as I hoped).
And on this page, you can see what happens if I use an org-mode file instead of a markdown file (locally, they work as well as as the other): the code block is not rendered, the header with tags and categories has disappeared, etc.).