-
Notifications
You must be signed in to change notification settings - Fork 438
Conversation
add a length filter that works for objects as well as arrays and strings
fix value mutation in sort and groupBy filters
Fixes import example typo
This fixes if the macro name is at the beggingin of the import name
I don't think a macro in a spaceless tag should be affected, but when a macro is used the output of it should be affected
Fixed spaceless tag stripping too much (#526)
Fixed colliding macro names and import names (#521)
Does anyone have a copy of the documentation at least? |
https://github.com/node-swig/swig-templates EDIT:
Many thanks to all again. Love the project and contributions. Thanks so much! <3 |
This is such a shame, I absolutely love this engine, and after spending half a day trying to swap it out for Twig (among others) I've found that it's not going to be that simple to replace. I have to say thanks to Paul for creating this engine, I respect the decision to move on, but it would be extremely handy to have a lasting documentation page online even in a plain text format in the repo for projects that still rely on this engine. |
I have just restored the original documentation here https://prakaashkpk.github.io/swig-docs/ Please feel free to make any changes to the documentation if it is incorrect. |
@prakaashkpk Maybe you could consider joining forces with https://github.com/node-swig/swig-templates/ instead of a separate fork? To start you could help them with this issue: node-swig/swig-templates#8 |
A few months back I created a static content system using swig, and everybody has loved it so far. Today I went to train a new employee using the docs only to find they were gone! Much respect to Paul and the rest for creating this and to the community for carrying the torch forward. If swig-templates is the successor then they have what support I can give, hopefully I can convince a few teammates to pitch in as well. It would be nice to have the issues back however, there were some useful discussions in there to refer to, and could really help the effort going forward. Perhaps if Paul and/or members of the original team could pass this project onto new maintainers or anoint an official successor from the forks, the community could focus it's efforts better and have a better shot at keeping swig going. It would truly be a shame to see this project gather dust, it really works quite well and I've yet to find another node solution for django/twig style templating. Viva Swig! |
https://wszgxa.github.io/swig/ |
the document page can't be access, wish someone can fix it. |
@zhangwentao You can access the documentation in |
Since it will not be maintained anymore, which is such a pity, and I really appreciate |
@visualfanatic swig-templates is looking like it will keep swig alive. While nunjucks is looking promising it's still missing some pretty important features that will most likely rule it out for some, such as the ability to pass parameters to includes, a deal breaker for my current project. I'm committed to swig for the foreseeable future because it's core to the work I've been doing for the past 4 month's, it too late to turn back, I'll be supporting the swig-templates project if needed as I'm sure will a few others. |
@nedkelly is right, nunjucks is nice but no params on includes is a deal breaker. I evaluated it before opting for swig, and the little omissions like that were what sealed the deal. Maintained or not, swig is still the best Js templating solution available. I'm going to be switching over to swig-templates in the near future. |
@nedkelly @redskyburning I see, but instead of using Old way <header>
<h1>{{ title }]</h1>
<p>{{ description }}</p>
</header>
{% include "../sections/header.html" with { title: "Contact", description: "Test" } %}
<form>
...
</form> New way {% macro header(title, description='') %}
<header>
<h1>{{ title }]</h1>
{% if description %}<p>{{ description }}</p>{% endif %}
</header>
{% endmacro %}
{% macro menu(links) %}
<nav>
{% for link in links %}
<a href="{{ link.url }}">{{ link.title }}</a>
{% endfor %}
</nav>
{% endmacro %}
{% import "../layout.html" as layout %}
{{ layout.header('Contact') }}
<form>
...
</form> I know that above example is stupidly simple, but it works. As I dig into Nunjucks issues I see that some stuff is missing, but you can easily add missing features using their API. |
Docs are back online here: http://node-swig.github.io/swig-templates/ All contributions to our fork are welcome. We're trying to get the project back into a good state for future development so any contributions towards that end would be appreciated. It is unfortunate that the issues are gone from this repo, as we now have no good way of knowing what bugs remain—but, if anybody finds any, please file them in our github issues and/or submit a PR. Thanks all, hopefully we can keep this great project alive! |
Nevermind, just use Nunjucks, swig is obsolete.
Thanks @gemwuu!