Hello, after upgrading to Hugo 0.62 from 0.4x, I’m trying (unsuccessfully) to untangle my Ace templates to use the new template lookup order. Starting with the homepage, if I create a template in ./layouts/index.html.html the homepage works fine. If I create ./layouts/index.ace or ./layouts/index.html.ace I get this error and nothing renders:
found no layout file for “HTML” for kind “home”: You should create a template file which matches Hugo Layouts Lookup Rules for this combination.
I’ve tried following this older thread and this one but the solutions presented there no longer work. The documentation suggests that a simple ./layouts/_default/baseof.ace template should suffice but this isn’t working either. Also I was somewhat confused by this comment in the docs:
Note that the html suffix is needed even if the filename is suffixed ace . This does not work from inside a theme (issue #763).
Should it be index.ace or index.html.ace or something else? I’ve tried various combinations without success. Hopefully I’m just doing something silly. I’m heavily invested in Ace templates for this site so I’d love to get it working. If I do, I’d be happy to clarify how to do it in the docs and submit a PR.
Update: In looking through previous release notes, I’ve discovered that both Ace and Amber support have been removed in Hugo 0.62 per issue #6609.
I’ll open a PR to reflect this in the documentation as I spent several hours trying to make it work as documented.
I hope it might be possible to support Ace (or Pug or other minimal templating languages). My entire site is written with Ace templates and my workflow is much faster using indented templates (vs HTML/XML/markup style).
Thanks for all the other great updates to Hugo! Hopefully I can port my templates over to Go Templates without too much effort and keep using this otherwise great tool.
Update: In looking through previous release notes, I’ve discovered that both Ace and Amber support have been removed in Hugo 0.62 per issue #6609.
I’ll open a PR to reflect this in the documentation as I spent several hours trying to make it work as documented.
Sorry, I don’t check the email this account is registered to often. I could have spared you the time.
I hope it might be possible to support Ace (or Pug or other minimal templating languages). My entire site is written with Ace templates and my workflow is much faster using indented templates (vs HTML/XML/markup style).
I completely agree with you, at work we have a simple maxim:
“Do not write (x|ht)ml, ever. It’s not for humans. Generate it.”
That said I understand why it was removed, even if by principle I will never agree with it.
Thanks for all the other great updates to Hugo! Hopefully I can port my templates over to Go Templates without too much effort and keep using this otherwise great tool.
Tell me if you find a good way of doing it, I’m also interested. But I’m afraid that what they call Go Templates is go code inside of html…
Haven’t really checked, still running happily on hugo 0.60.1 .