gohugoio / hugo

The world’s fastest framework for building websites.
https://gohugo.io
Apache License 2.0
75.77k stars 7.53k forks source link

Add pug template support #3777

Closed liuhuancom closed 6 years ago

liuhuancom commented 7 years ago

Add pug template style support pug

rdwatters commented 7 years ago

I'm not especially familiar with Pug syntax, but I seem to recall it being very similar to either Amber or Ace. Have you read the following docs?

https://gohugo.io/templates/alternatives/

Your request seems like a very tall order...unless there is a direct Pug port to Golang. I couldn't find any, but I think this is a germane reference:

https://github.com/pugjs/pug/issues/2343

liuhuancom commented 7 years ago

I know thank you my friend

liuhuancom commented 7 years ago

How to use amber in Content TOML or YAML in md? Not in Templates

rdwatters commented 7 years ago

I think at this point, this question would be better posed on the forums: https://discourse.gohugo.io since we are quickly veering off the original issue's title, please. Thanks!

liuhuancom commented 7 years ago

Thanks!

bep commented 7 years ago

https://github.com/Joker/jade

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. 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 master branch, please reply with all of the information you have about it in order to keep the issue open. If this is a feature request, and you feel that it is still relevant and valuable, please tell us why. This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.

jalberto commented 5 years ago

I will love to see pug/jade support in hugo, there are several Go implementations of both, jade and pug (https://github.com/eknkc/pug this one is actually by amber creator)

rolojf commented 5 years ago

It would be a great addition. Consider this:

The popularity of this template pugjs comparing how many stars in github pugjs has to other templates like liquid, handlebars, jinja2 it's clear it's some what popular. (not as much as hugo ;)

https://github.com/Joker/jade already did some heavy lifting. I just don't know how to implement it myself in hugo. But it would be a very good and would become popular I think.

zor-el commented 4 years ago

Pug is to HTML what Sass is to CSS: A clean and very concise markup. Amber and Ace were alternatives for Hugo that followed the spirit of Pug. Alas, Hugo 0.62 dropped support for Amber and Ace (so now we have no alternative templating languages at all).

I'd like to suggest to reconsider this issue and look into Pug.go, as suggested by @jalberto.

rudolfschmidt commented 4 years ago

I use pug and stylus for my work and I consider to try hugo to create static websites without hassle with databases and further crap but for that I need pug and stylus support.

mrichman commented 4 years ago

+1 for pug support

ndastur commented 4 years ago

Absolutely, can't believe it's not supported. Who wants to deal with closures

clevett commented 4 years ago

+1 Pug support

davidsneighbour commented 4 years ago

I love seeing "+1 on closed issues" (2.5 years in the future) in it's natural habitat :) I think the proper way to re-vive the topic of "Pug as template engine for Hugo" would be to open a new issue and committing time and resources to this topic because it's obviously not on top of the list of features that have urgency. Jade.go is still active, so that would be a starting point. On a side note: I think the removal of "alternative templating engines" is something that is due to these alternatives having to be checked and tested each time anything changes in Hugo, and that seems to be a massive task. If nobody has resources to help creating this and maintaining it then let this issue stay closed and resting in peace now :)

github-actions[bot] commented 2 years ago

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.