hugo-tranquilpeak-theme
hugo-tranquilpeak-theme copied to clipboard
unable to insert raw html to the posts
Configuration
- Operating system with its version: Windows 11 Home
- Browser with its version: Chrome 110.0.5481.77 / FireFox 108.0.2 (64-bit)
- Hugo version: hugo v0.100.1-0afb4866e345d31cbbcbab4349e43f1d36122806+extended windows/amd64 BuildDate=2022-06-01T10:11:48Z VendorInfo=gohugoio
- Tranquilpeak version: 0.5.3-BETA
- Do you reproduce on https://tranquilpeak.kakawait.com demo?: No
Issue: I tried to get some stuff in the posts using HTML tags directly in the .md files, but i was unable to do it. I don't know if this is a general problem, some people's problem, or just me, but I'd be very pleased it if you would allow me to share a possible solution for those who might be affected by this issue.
Possible solution: (shortcodes) In this webpage you can find the steps to do it.
I apologize if this post was created in the wrong place.
My best,
Pablo
Thank you!
I have the same problem
Hey @luojing94 !
You can try the possible solution that grojar propossed: Raw html short code
Here is a live example:
-
Add the rawhtml shorcode: https://github.com/TheScienceOfCode/hugo-tranquilpeak-theme/blob/0eae7fa35a095271d12723edf9dcc57d405727a8/layouts/shortcodes/rawhtml.html
-
Use it on your post: https://github.com/TheScienceOfCode/thescienceofcode.github.io/blob/0e14609ec5be6de7c5e0b40fcf69cc25fa3415be/content/post/sdl-vscode-c-cpp-debug.en.md?plain=1#L185
-
Results here: https://thescienceofcode.com/sdl-vscode-c-cpp-debug/
@dacanizares Thank you very much I solved it according to your method. Good luck to U!
@dacanizares hello ,Sorry for bothering you I have a problem with switching languages. In your example, you have a button that switches between English and Spanish. Can I ask how you do that?
Hi @luojing94 !
Sorry for the delay.
Here is the button: https://github.com/TheScienceOfCode/hugo-tranquilpeak-theme/blob/0eae7fa35a095271d12723edf9dcc57d405727a8/layouts/partials/lang_translations.html
Also check my site config: https://github.com/TheScienceOfCode/thescienceofcode.github.io/blob/dev/config.toml
And finally, just create the posts as here: https://github.com/TheScienceOfCode/thescienceofcode.github.io/tree/dev/content/post
Regarding your layout, here you can find config files for internationalization: https://github.com/TheScienceOfCode/hugo-tranquilpeak-theme/tree/0eae7fa35a095271d12723edf9dcc57d405727a8/i18n
Good luck!
@dacanizares Thank you! I have found another way these days, but it takes up a lot of space, which is to combine the same blogs in two languages. The reference is https://saltyleo.com/en/1448.html
But I'm going to use your method instead because it's something I really want to master and is better at.
Thank you very much! I wish you all the best~
Hey @luojing94 !
You can double-check the official Hugo documentation regarding i18n: https://gohugo.io/content-management/multilingual/
Good luck!