Hello,
At the moment, all the internal shortcodes and templates are inlined in a single file: template_embedded.go.
Move the shortcodes and templates from:
hugo/tpl/tplimpl/template_embedded.go
to:
- hugo/tpl/tplimpl/
template_embedded.go
- hugo/tpl/tplimpl/internal_shortcodes/
figure.html
..
- hugo/tpl/tplimpl/internal_templates/
opengraph.html
..
The template_embedded.go will still be there, but now instead of inlining all the code in there, it will loop through all the files in internal_shortcodes and internal_templates and read those in. That should be possible, right?
??
Another advantage: Easier to unit test.
That should be possible, right?
Yes, but it sadly involves an extra "go generate" build step. But I think it's still worth it, so I will do it.
Awesome! Thank you!
Most helpful comment
Yes, but it sadly involves an extra "go generate" build step. But I think it's still worth it, so I will do it.