-
Notifications
You must be signed in to change notification settings - Fork 131
Conversation
…d create and overview page
…, for instance the github page
@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. |
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
done :) |
Thanks for that. I'll pull it down and take a look at it now. |
If everyone is comfortable with jade, sure I guess. I still think hbs is more well-known (despite the fact that I like jade). |
I think jade is superior and helps spread the usage of "good" tools within the community |
any updates on this? |
@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. |
On the agenda for Mar 2nd Website WG meeting #240 |
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. |
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.md
Write 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__translated
meta 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.json
andmaster.jade
add a blog (en
only)fixes/support:
<html lang="de">
__transletd
meta object, otherwise the fallback will be used