(the Site I’m talking about will be https://github.com/edsh/www-public/tree/initial-hugo)
I am trying to migrate from a CMS-driven site to Hugo, with many handcrafted web pages each (no “blog” altogether).
I planned to use “HTML” pages as the content at first to ease the migration path (or make it possible altogether); however I learned that I cannot use Go template literals in content HTML which is a bit of a dealbreaker.
Why is that? Is it planned to reintroduce this at some point, similar to how I can use shortcodes?
You cannot use Go templates in content files in general, not just in HTML content files. This is why we have shortcodes.
so, I guess this is a deliberate design decision and not just a “lacking feature” right?
What do you guys suggest; is Hugo just not the right SSG for my use case?
Take a look in the documentation section about Templates.
I can’t say if it would be difficult to make this transition, cuz I don’t know German. If I had to judge only by the number of files, I would say it’s feasible.
And the HTML is very well structured.
Perhaps a coffee bottle would be enough.
I’m not sure if you got my problem right, @sephore. At the moment I cannot rely on markdown-only driven content because the layout is too complicated; and using HTML unfortunately lacks the ability to have Go template functionality, which makes it hard to e.g. link to images.
My answer was more like a complement to what has already been said by @pointyfar.
To link images, you’ll need shortcodes (which are templates). To more complex stuff, partial/page/data/(…) templates.
I don’t understand why you’re insisting on the “markdown-only” thing. Maybe I’m really missing something, sorry.
yep, I think I got it now. I was just soo (!) confused of having HTML content files and the need to use shortcodes in there, who, guess what, render HTML again.
For markdown this makes sense of course; but why would I have to use a special annotation syntax in HTML that just does a detour and render HTML.
This is especially counter-intuitive for me since in “layout context”, the Go annotations work, but in content context they do not.
So thanks so far; I guess I can work with that and still use shortcodes if I have to.
The difference is not in
html files. The difference is content files vs layout files. Layout files are not exclusively
html files; you can for example output
txt or even