Uh oh!
There was an error while loading. Please reload this page.
use jade templates - #195
Conversation
…d create and overview page
…, for instance the github page
therebelrobot
commented
Feb 15, 2015
@iojs/website can we all take a look at this? I know the template task needs lots of loving, and if this jade solution works for what we need, I'm willing to jump the html-template boat. I'm gonna add this to the agenda for tomorrow so we can discuss how it does. @timaschew a couple things: we haven't yet decided on bringing in a blog, as its still an open issue #68, so I would prefer having that in a separate PR. generally we want to keep refactors and additions separate in PRs to ensure everything is being reviewed properly. Also, there is a merge conflict in this PR, will you take a look at that too? I'm gonna pull down your changes and take a look at them today, see how it all performs. |
timaschew
commented
Feb 15, 2015
yeah I wanted to demonstrate how easy it is to include a (static) blog with jade ;) Great, I will cut the blog out and fetch the new changes from the upstream |
Conflicts: gulp/tasks/templates.js package.json source/templates/main.html
timaschew
commented
Feb 15, 2015
done :) |
therebelrobot
commented
Feb 15, 2015
Thanks for that. I'll pull it down and take a look at it now. |
Fishrock123
commented
Feb 16, 2015
If everyone is comfortable with jade, sure I guess. I still think hbs is more well-known (despite the fact that I like jade). |
alubbe
commented
Feb 16, 2015
I think jade is superior and helps spread the usage of "good" tools within the community |
timaschew
commented
Feb 22, 2015
any updates on this? |
snostorm
commented
Feb 26, 2015
@timaschew this is on the working group agenda for next meeting. To meet some interim needs I do have #243 up right now which quickly swaps out to using handlebars (for now) but I'm still open to discussion around bigger changes -- especially since the templates build script can continue to be iterated on to be made faster and more flexible. |
therebelrobot
commented
Mar 2, 2015
On the agenda for Mar 2nd Website WG meeting #240 |
therebelrobot
commented
Mar 4, 2015
Unfortunately, as per our discussion in the last WG meeting, we aren't going to be pulling in jade for the time being. Maybe down the road after we get a new design in place it'll make more sense, but handlebars is handling what we need to for now. |
timaschew
commented
Mar 4, 2015
Why it does only sense with a new design? |
This is kind of a next step of #187
You see the generated website via github pages here: http://timaschew.github.io/website/en/index.html
So the main change was to use jade for the templates
and provide a blog with the medium articles as markdown files and a index page for the blog which list all the articles with the date, which is encoded into the filename of each article, for instance:2015-02-10_io-js-and-a-node-js-foundation.mdWrite the templates in jade change the gulp template task from this:
to this:
The template also looks more clear, instead of writing
we can write this:
But the really cool feature is that we can use logic into the template like create markup on condition or loop over an array like for the blog articles:
Another change due to the
template.json: there is now a fallback with a__translatedmeta object, so you can check if a (new) property is already translated or not, if not the fallback (english) value will be used.With this trick the blog will be displayed in the menu only if the blog-link was translated in a given language:
to summarize, this pull request include:
templates.jsonandmaster.jadeadd a blog (enonly)fixes/support:
<html lang="de">__transletdmeta object, otherwise the fallback will be used