-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
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
Add Mustache template support #60
Comments
I agree and it shouldn't be very difficult. Could seamlessly support both Steve Francia On Aug 26, 2013, at 5:08 PM, Xavier [email protected] wrote: Mustache is langugage independent template system. If you implement Thanks, — |
If I were Go programmer, I will do, but right now, I'm just user of static content generators. I tried several: nanoc, acrylamid, hakyll, but all of these have an issue: 'if you want to use me, you have to learn new template syntax'. Very nice if someone could implement it, Thanks, |
I'm all in favor of supporting mustache and any other templating language The catch is for any of these additional formats I need someone to be the Anyone up for taking on mustache? Steve Francia On Tue, Aug 27, 2013 at 5:07 AM, Xavier [email protected] wrote:
|
I'll take a stab at putting together support for Mustache. I haven't made any contributions to a Go project yet so it'd be great to get some feedback once I submit a pull request. |
I'd love to help provide feedback and even help code it, just can't Steve Francia On Tue, Aug 27, 2013 at 11:34 PM, Bennett [email protected] wrote:
|
Awesome! I'd gladly maintain, @spf13. I'll have some free time next week to get started. |
I would like to add amber as template engine: https://github.com/eknkc/amber |
Should this issue be closed? There's already a dependency on the eknkc/amber package in |
Amber came out of this, mustache still hasn’t… I suppose it’s still open. |
Ah, I see. I'm looking to contribute so I poked to the back of the issue list and saw this one; wasn't sure if it was a sign of lack of triaging/caretaking or not :) |
Looking into this, it appears that the mustache package in Go, hoisie/mustache, is no longer maintained. The last commit was May 13, 2013, with pending pull requests. There are more recent forks out there, but I didn't check what changes they made. Is mustache something that should be a milestone given its state in Go? |
I suppose not. It's sad there isn't better mustache support in Go. Until there is we should mark this as future. |
I forked what seemed to be the best version of mustache: Wuvist/mustache, went through all the pull requests on https://github.com/hosie/mustache, and updated the tests. I didn't integrate all of the outstanding pull requests. I used the updated tests from @adammck but had to update a signifcant amount of their expectations to meet what I though mustache expected. They all pass, though that doesn't mean they are all correct. I have a list of the failed test lines that were changed and will post that as an issue on my repo. Beyond that, I haven't had a chance to do much with it, but I will probably set up a Hugo site using it to see what breaks on the mustache side. Hopefully, it support for it will be added to Hugo soon. |
The tests in hoisie/mustache/pull/43 were generated from the Mustache spec by this little tool. I believe that the expectations are correct, but the Mustache library is non-compliant. |
@adammck Thanks for your input! I had read the Mustache docs, but they were unclear on what should occur in certain situations, the ones which the Mustache library failed on. I couldn't find anything clearer in other tests I looked at so I did a combination of looking at the strings and what I thought the resulting substitutions would look like, which got rough on the tests that tended to fail, and the output, for simpler cases, from trymustache.com. The results tended to match the results from the library, but I did not attach any validity to that coincidence, hence my comments about passing and correctness. I wish I had seen the specs and your tool earlier. I'll go through the spec and your tool to get a better understanding of Mustache and what needs to be done to the library. |
After review of the spec objects, I have reverted the Mustache tests to @adammck's version. I will update when the Mustache library is compliant to the current set of tests. |
@spf13 can this be pushed to 'Future' instead of .13 milestone? There is a chance I will get this done sooner than that, but I still wouldn't be comfortable having it as part of the next release, esp. since there's enough changes in it already. When I originally said I'd add support it was based on using the existing Go mustache package, but that is not a workable solution imo, or there seems to be a reason, or reasons, why there are so many abandoned forks. That coupled with the original author's response to using the Mustache spec tests led me to decide that a different package should be used. Unfortunately that meant writing one from scratch. The package, when completed, being so new, is the reason why I wouldn't be comfortable having it as part of the next release, even if it were completed before then. |
Totally valid reasons. Bumping. |
@mohae status? |
This issue has been automatically marked as stale because it has not been commented on for at least four months. The resources of the Hugo team are limited, and so we are asking for your help. If this is a bug and you can still reproduce this error on the If this is a feature request, and you feel that it is still valuable, please open a proposal at https://discuss.gohugo.io/. This issue will automatically be closed in four months if no further activity occurs. Thank you for all your contributions. |
Note/Update: This issue is marked as stale, and I may have said something earlier about "opening a thread on the discussion forum". Please don't. If this is a bug and you can still reproduce this error on the latest If this is a feature request, and you feel that it is still relevant and valuable, please tell us why. |
I would say that, this issue being so old, and no one has stepped up to the task of implementing it: If someone wants to create a PR with this feature, he/she should create a new tracking issue. |
A change was made in response to gohugoio#60 (fork/exec: exec format error) on the wiki that would be useful to also propagate to the readme.
1de7a358c Clarify that "with" blocks do not render with empty values (#1287) b48de8b0a Update js.md e0124e4b1 Update js.md 087b39d74 Update hosting-on-render.md (#1286) 8f02b5412 Update js.md (#1284) 8dd8a8d1d Add link to "Build Websites with Hugo" book (#1174) ae2dc138a Fix typo in page bundles (#1283) ab14bfec3 Update configuration directory section 17da77ff1 Update multilingual.md (#1280) 5bce8db3a Fix for site-hierarchy image, issue #60 9d7a2366d Fix typo ad4210c41 Fix typo c88bc0383 Fix orphan branch url (#1262) 1cf6cf5b3 Hugo 0.78.2 538c3cb86 Merge branch 'tempv0.78.2' e5e07fc81 releaser: Add release notes to /docs for release of 0.78.2 120a61a47 Fixed wrong var assignment example 4cebbb1a7 Ignore remote JSON errors (for now) 618fcf9ba Add a link to modules config option 'replacements' e12722779 Fix typo ("wil" -> "will") (#1273) 0670e9894 Update js.md 5bde834cf Update GH docs to say "main" as default branch 26312f93d Update index.md eb6f51df1 Update js.md b890dc84d Merge branch 'tempv0.78.1' 6b73ea450 releaser: Add release notes to /docs for release of 0.78.1 46e582112 Update starter-kits.md (#1268) a62786235 Update 404 docs: GitLab auto-detects 404.html (#1173) cbd4fd2d9 Fix typo (#1271) 2ba3f9386 Update js.md 7b5109d90 Update js.md bc75bc962 Release 0.78.0 0b2e8b0f1 releaser: Add release notes to /docs for release of 0.78.0 9ecba8480 Merge commit 'b74591123eac47a20d1f26ff3e2d291cd9c5cfc0' 60a475df7 js: Add avoidTDZ option 3b895261f Make js.Build fully support modules git-subtree-dir: docs git-subtree-split: 1de7a358cac94ac09a513456bdaae65e6ae94859
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Mustache is langugage independent template system. If you implement mustache support I think more people migrated from other static site generators.
Thanks,
The text was updated successfully, but these errors were encountered: