Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

noob errors shortcode at first installation (as a submodule) #460

Closed
evanescente-ondine opened this issue Jul 14, 2022 · 8 comments
Closed

Comments

@evanescente-ondine
Copy link

evanescente-ondine commented Jul 14, 2022

Hi,
I found this theme to be exactly what I wanted minus a few stylistic details, but I'm completely helpless in web management. I wanted to dowload your demo and figure out with the exemple where goes what, so I did the procedure to install from scratch (hugo new site mydocs; cd mydocs; git init; git submodule add https://github.com/alex-shpak/hugo-book themes/hugo-book; cp -R themes/hugo-book/exampleSite/content .), but I got errors I don't understand, with shortcodes or whatnot. I suppose I just miss a few libraries, as usual.

Thanks for your wonderful theme.

Details ~/D/A/M/Y/my_blog_en (master)> git submodule add https://github.co m/alex-shpak/hugo-book themes/hugo-book

Clonage dans '/home/drm/Documents/Autres_recherches_historiques_ou_genetique/Mes_propres_textes/Youtube/my_blog_en/themes/hugo-book'...
remote: Enumerating objects: 4070, done.
remote: Counting objects: 100% (23/23), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 4070 (delta 2), reused 13 (delta 1), pack-reused 4047
Réception d'objets: 100% (4070/4070), 6.24 Mio | 921.00 Kio/s, fait.
Résolution des deltas: 100% (2086/2086), fait.

~/D/A/M/Y/my_blog_en (master)> hugo server --minify --theme hugo-b
ook

Start building sites …
hugo v0.101.0+extended linux/amd64 BuildDate=unknown

               | EN  

-------------------+-----
Pages | 7
Paginator pages | 0
Non-page files | 0
Static files | 78
Processed images | 0
Aliases | 2
Sitemaps | 1
Cleaned | 0

Built in 291 ms
Watching for changes in /home/drm/Documents/Autres_recherches_historiques_ou_genetique/Mes_propres_textes/Youtube/my_blog_en/{archetypes,content,data,layouts,static,themes}
Watching for config changes in /home/drm/Documents/Autres_recherches_historiques_ou_genetique/Mes_propres_textes/Youtube/my_blog_en/config.toml
Environment: "development"
Serving pages from memory
Running in Fast Render Mode. For full rebuilds on change: hugo server --disableFastRender
Web Server is available at http://localhost:1313/ (bind address 127.0.0.1)
Press Ctrl+C to stop

~/D/A/M/Y/my_blog_en (master)> cp -R themes/hugo-book/exampleSite/
content .

~/D/A/M/Y/my_blog_en (master)> hugo server --minify --theme hugo-b
ook

Start building sites …
hugo v0.101.0+extended linux/amd64 BuildDate=unknown
WARN 2022/07/14 10:55:12 Expand shortcode is deprecated. Use 'details' instead.
Error: Error building site: "/home/drm/Documents/Autres_recherches_historiques_ou_genetique/Mes_propres_textes/Youtube/my_blog_en/content/docs/shortcodes/mermaid.md:14:1": failed to render shortcode "columns": failed to process shortcode: "/home/drm/Documents/Autres_recherches_historiques_ou_genetique/Mes_propres_textes/Youtube/my_blog_en/themes/hugo-book/layouts/shortcodes/columns.html:4:12": execute of template failed: template: shortcodes/columns.html:4:12: executing "shortcodes/columns.html" at <$.Page.RenderString>: error calling RenderString: "/home/drm/Documents/Autres_recherches_historiques_ou_genetique/Mes_propres_textes/Youtube/my_blog_en/content/docs/shortcodes/mermaid.md:3:13": unrecognized character in shortcode action: U+005B '['. Note: Parameters with non-alphanumeric args must be quoted
Built in 790 ms [/details]

@alex-shpak
Copy link
Owner

Hi!
There is and unsolved nesting issues in shortcodes at the moment.
#452

It happens when shortcode is nested in another shortcode. Before fix either:

  1. install pre 0.100 version of hugo
  2. delete nested shortcode in mermaid/katex pages

It turned to be not easy to fix :)

@evanescente-ondine
Copy link
Author

evanescente-ondine commented Jul 14, 2022

delete nested shortcode in mermaid/katex pages

Sure ? How do I do ?
What would it change ?
thanks for your quick response, for once I'm not to blame...

Do I just remove themes/hugo-book/static/katex plus themes/hugo-book/layouts/shortcodes/katex.html plus myblog_en/content/docs/shortcodes/katex.md?

@evanescente-ondine
Copy link
Author

evanescente-ondine commented Jul 14, 2022

ok I did that (only the lines, not what was between), and erase the the column line in content/_index.md because it complained.
Now it's:

~/D/A/M/Y/myblog_en (master)> hugo server
Start building sites …
hugo v0.101.0+extended linux/amd64 BuildDate=unknown
Error: Error building site: "/home/drm/Documents/Autres_recherches_historiques_ou_genetique/Mes_propres_textes/Youtube/myblog_en/content/docs/shortcodes/section/_index.md:15:1": failed to extract shortcode: template for shortcode "section" not found
Built in 19 ms

@alex-shpak
Copy link
Owner

hm, well, it works for me, do you have your code pushed to git somewhere? Perhaps not all templates were copied

@evanescente-ondine
Copy link
Author

evanescente-ondine commented Jul 15, 2022

Huh, I repeated the steps and it works. Thanks.
So the shortcode column does work but not nested... Ok.
I wonder why Hugo or whoever designed them couldn't come up with a [column] tag instead of these notations alien to markdown but whatever, I ain't gonna use them much.

@alex-shpak
Copy link
Owner

yep, problem is with shortcodes inside of other shortcodes in versions 100+

@evanescente-ondine
Copy link
Author

Look, by mistake I erased my repertory and had to repeat the steps.
and it did again ! There's something wrong in that behavior, I need to understand where the shortcodes section and column are defined. no assets and not shortcodes.scss

ok I did that (only the lines, not what was between), and erase the the column line in content/_index.md because it complained. Now it's:

~/D/A/M/Y/myblog_en (master)> hugo server
Start building sites …
hugo v0.101.0+extended linux/amd64 BuildDate=unknown
Error: Error building site: "/home/drm/Documents/Autres_recherches_historiques_ou_genetique/Mes_propres_textes/Youtube/myblog_en/content/docs/shortcodes/section/_index.md:15:1": failed to extract shortcode: template for shortcode "section" not found
Built in 19 ms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants