Skip to content
This repository was archived by the owner on Apr 11, 2018. It is now read-only.

Why would you disable the issues? #661

Closed
wants to merge 31 commits into from
Closed

Conversation

damianstasik
Copy link

@damianstasik damianstasik commented Aug 7, 2016

Nevermind, just use Nunjucks, swig is obsolete.
Thanks @gemwuu!

paularmstrong and others added 30 commits August 4, 2014 12:06
add a length filter that works for objects as well as arrays and strings
fix value mutation in sort and groupBy filters
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)
@omguhh
Copy link

omguhh commented Aug 9, 2016

Does anyone have a copy of the documentation at least?

@Loque-
Copy link

Loque- commented Aug 9, 2016

https://github.com/node-swig/swig-templates

EDIT:
Sorry I didn't have enough time to comment before. First of all, I love this project and am very grateful for the input by all.

Many thanks to all again. Love the project and contributions. Thanks so much!

<3

@nedkelly
Copy link

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.

@prakaashkpk
Copy link

I have just restored the original documentation here https://prakaashkpk.github.io/swig-docs/
Most of the links seems to be working. Also I am planning to contribute to this project in my spare time on the forked version here

Please feel free to make any changes to the documentation if it is incorrect.

@loganvolkers
Copy link

@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

@redskyburning
Copy link

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!

@wszgxa
Copy link

wszgxa commented Aug 22, 2016

https://wszgxa.github.io/swig/
the old documention

@zhangwentao
Copy link

the document page can't be access, wish someone can fix it.

@prakaashkpk
Copy link

prakaashkpk commented Aug 24, 2016

@zhangwentao You can access the documentation in
https://prakaashkpk.github.io/swig-docs/ or https://web.archive.org/web/20151217051834/http://paularmstrong.github.io/swig/ or
https://wszgxa.github.io/swig/

@gemwuu
Copy link

gemwuu commented Aug 25, 2016

Since it will not be maintained anymore, which is such a pity, and I really appreciate
Paul's effort, I personally recommend you guys the similar engine written by Mozilla, nunjucks

@nedkelly
Copy link

@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.

@redskyburning
Copy link

@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.

@damianstasik
Copy link
Author

@nedkelly @redskyburning I see, but instead of using include, you could just use macro. Here is an example:

Old way
sections/header.html

<header>
   <h1>{{ title }]</h1>
   <p>{{ description }}</p>
</header>

pages/contact.html

{% include "../sections/header.html" with { title: "Contact", description: "Test" } %}
<form>
...
</form>

New way
layout.html

{% 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 %}

pages/contact.html

{% 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.

@Lochlan
Copy link

Lochlan commented Aug 31, 2016

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!

Repository owner locked and limited conversation to collaborators Feb 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.