prometheus-operator / website

The Prometheus Operator & kube-prometheus website
https://prometheus-operator.dev
Apache License 2.0
11 stars 25 forks source link

Hugo: template for shortcode "alert" not found #10

Closed leewei05 closed 3 years ago

leewei05 commented 3 years ago

Hi,

I was trying to run the website locally. But after I run make, Hugo returned an error. It seems like theme doks is not downloaded?

make
cd themes/doks/ && \
    npm install && \
    rm -rf content

up to date, audited 1 package in 303ms

found 0 vulnerabilities
bash synchronize.sh
Cloning into 'repos/prometheus-operator'...
remote: Enumerating objects: 440, done.
remote: Counting objects: 100% (440/440), done.
remote: Compressing objects: 100% (395/395), done.
remote: Total 440 (delta 93), reused 139 (delta 21), pack-reused 0
Receiving objects: 100% (440/440), 3.04 MiB | 1.07 MiB/s, done.
Resolving deltas: 100% (93/93), done.
Cloning into 'repos/kube-prometheus'...
remote: Enumerating objects: 265, done.
remote: Counting objects: 100% (265/265), done.
remote: Compressing objects: 100% (240/240), done.
remote: Total 265 (delta 85), reused 75 (delta 17), pack-reused 0
Receiving objects: 100% (265/265), 272.33 KiB | 645.00 KiB/s, done.
Resolving deltas: 100% (85/85), done.
cp: images/custom-metrics-elements.png: No such file or directory
hugo
Start building sites …
Total in 60 ms
Error: Error building site: "/Users/leewei/dev/website/content/docs/prologue/introduction.md:31:1": failed to extract shortcode: template for shortcode "alert" not found
make: *** [public] Error 255
simonpasquier commented 3 years ago

I hit the same issue :) You need pull the doks theme which is included as a git submodule:

git submodule init
git submodule update
ChanderG commented 2 years ago

I am facing this issue - though I have done the submodule init/update steps. From the discussion here: https://github.com/h-enk/doks/discussions/273, it looks as if the doks theme has changed the way it works?

ChanderG commented 2 years ago

I figured out this much - it's a bug in recent versions of Hugo. v0.83.1 is the latest version of Hugo which compiles this website correctly.

Versions v0.84.x panic and versions 0.85.0 onwards throw this error failed to extract shortcode: template for shortcode "alert" not found, though the cause is different.