Struggled a bit with Hugo permalinks for posts that bundle the post and images together in a folder. I’m assuming this is related to the following configuration in config.yml
permalinks:
posts: /:year/:month/:title/
Turns out the export filename must be called index
, like explained over at gohugo.io
https://discourse.gohugo.io/t/images-with-custom-permalink/15160
For ox-hugo
, the org-mode
variant of Hugo, the following properties needed to be set for the heading
* PWM fan on Raspberry Pi 4 :pi:rpi4:fan:pvm:
:PROPERTIES:
:EXPORT_FILE_NAME: index
:EXPORT_HUGO_BUNDLE: pwm-fan-on-raspberry-pi-4
:END:
In retrospect I guess it kinda makes sense as the bundle ends up creating a folder, pwm-fan-on-raspberry-pi-4/
that includes the post and images.
exa --tree
├── content
│ ├── archive.md
│ ├── posts
│ │ ├── pwm-fan-on-raspberry-pi-4
│ │ │ ├── 1.webp
│ │ │ ├── 2.webp
│ │ │ ├── 3.webp
│ │ │ ├── 4.webp
│ │ │ ├── 5.webp
│ │ │ ├── 6.webp
│ │ │ └── index.md
The example was taken from the post PWM fan on Raspberry Pi 4 .