doks
doks copied to clipboard
Shortcode issues with hugo github action
Description
Run hugo --minify
WARN 2022/07/15 09:28:50 Module "project" is not compatible with this Hugo version; run "hugo mod graph" for more information.
Start building sites …
hugo v0.101.0-[4](https://github.com/IdiosApps/doks-test/runs/7355365707?check_suite_focus=true#step:4:5)66fa43c16709b4483689930a4f9ac8add[5](https://github.com/IdiosApps/doks-test/runs/7355365707?check_suite_focus=true#step:4:6)c9f[6](https://github.com/IdiosApps/doks-test/runs/7355365707?check_suite_focus=true#step:4:7)6 linux/amd64 BuildDate=2022-06-16T0[7](https://github.com/IdiosApps/doks-test/runs/7355365707?check_suite_focus=true#step:4:8):09:16Z VendorInfo=gohugoio
Error: Error building site: "/home/runner/work/doks-test/doks-test/content/en/docs/prologue/quick-start.md:21:1": failed to extract shortcode: template for shortcode "details" not found
Total in 17 ms
Error: Process completed with exit code 255.
I made the site with https://getdoks.org/docs/tutorial/start-new-project/, and set up the git repo like https://getdoks.org/docs/tutorial/deploy-your-site/
I got the same error for alerts
. So I deleted them. I don't know how many shortcodes it will fail to find.
The hugo minify command is OK locally. This might be an issue with the github action?
Steps to reproduce
See above. Failed logs at https://github.com/IdiosApps/doks-test/pull/3
Expected result
hugo --minify
should be OK, just like local run
Are there some missing shortcodes in the layout folder?
https://github.com/h-enk/doks/tree/master/layouts has layouts
https://github.com/h-enk/doks-child-theme/tree/master/layouts does not have layouts
If shortcodes are not included in the child theme layout, should the child theme use shortcodes in document files?
Just seen https://github.com/h-enk/doks-gh-pages so I realise the github action for pushing to gh-pages branch should use npm, not hugo. However, the above example repo has a layouts folder with shortcodes. So I think the possible issue is still there
I believe this shortcode is delivered via NPM. So while it's possible, I don't experience this with netlify so it's more likely the NPM issue.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.
WARN 2022/07/15 09:28:50 Module "project" is not compatible with this Hugo version; run "hugo mod graph" for more information.
Look like you tried to use Doks as a Hugo module (that won't work). Could you try running npm run build
(in stead of hugo --minify
)?
And could you try with this workflow: https://github.com/h-enk/doks-gh-pages/blob/master/.github/workflows/deploy-github.yml
I will also test it locally + get back to you
I don't have the time to check for now, but I think I was using the Hugo documentations GHA example at first - which used Hugo commands
I think I deleted the shortcodes and then switched to the Doks npm GHA example, so from memory i can't say whether the issue should be closed due to human error.