Closed MoOx closed 10 years ago
Not really. I want to build a page that list all my blog posts on my website, using handlebars loop.
I just want to achieve that http://jekyllrb.com/docs/posts/#displaying_an_index_of_posts (as you can see I'm trying to migrate from jekyll to assemble :) )
I'm reading that part of the doc, it seems I've to tag my posts pages & I should be able to do what I want. http://assemble.io/docs/Pages-Collections.html. I'll take a look asap if I've permalinks available somewhere.
With the latest commit, you should be able to loop over the pages
collection like the documentation suggests, and use the relative
helper to find the relative link between the current page.dest
and each this.dest
within your pages
loop.
We might have to push this latest commit to npm before it'll work exactly right and I think there's another issue that had been open with a code example that I'll try to find.
Cool. Thanks for your work !
@MoOx take a look at this example page.
The highlighted lines show how to loop over the pages collection and build relative links. This is done in markdown, so you'll have to change it to work with your html, but it's a good example.
Nice ! Is there a way to only loop on a certain bundle of pages ? eg loop on "posts" & not all my pages ?
@MoOx, here is an example of using {{is}}
for building navigation.
There are a few ways to do this, but is a good starting point.
@jonschlinkert your link give me a 404 :s
Sorry about that! It's correct now. without even thinking I just updated the dir structure for the templates. I need to remember that issues are linked to those from time to time!
Works llike a charm. Thanks !
I want to achieve a simple thing: create a index of my blog posts. This involves a list of posts metas (done by hand), but I'm missing url builded by this plugins. I take a look to the source, it seems it'll not be easy to reuse the code/retrieve builded urls. Am I missing something ?