Closed Hypercubed closed 10 years ago
I think it may be that the dest is not updating in the tags collection
yeah, good call. I think that's right. we'll look into this, thanks for submitting the ticket
@Hypercubed take a look at this HTML and let me know if you see anything amiss: https://github.com/assemble/permalinks/pull/30
I added targets to the Gruntfile for testing how paths calculate with collections, and everything seems to be calculating okay to me, but this wouldn't be the first time I missed something when looking at the compiled HTML. I'm just trying to pin down the issue to something specific so we can track this down.
thanks!
This is the file (a repo) that is failing for me.
https://github.com/Hypercubed/assemble-bootstrap-template/blob/dev/src/test.hbs
The pages section shows out/test/index.html
while tags section shows out/test.html
.
Your best bet is to look over what I pushed up and see if you can get a hint about what's going on.
If I understand the tests (it's possible I don't) shouldn't articles/bar/index.html
, articles/baz/index.html
, and foo/index.html
be generating the same thing? Instead I see that bar
shows the pre-permalink path for all three pages, baz
is only correct for bar
, and foo
is correct for bar
and baz
but not for itself.
Looks to me that the dest
is updated as each page is rendered. Maybe not a coincidence that this appears to be the order they are in the file structure.
Yeah, if you run grunt assemble:preset -v
you will see that the plugin is run only as it renders each file. Meaning, as far as I can tell, the {{dest}}
is not changed for files it hasn't reached yet.
@Hypercubed That's why I am proposing #360 (https://github.com/assemble/assemble/pull/360). @jonschlinkert Using the "before" stage for this plugin seems like it could address the issue.
I'm pretty sure this is fixed. please see ./test/actual
, there are a number of tests using collections.
I have a page (say
test.html
) with the permalinks plugin andpreset: 'pretty'
. The file is then written totest/index.html
but{{dest}}
in the tags collection is stilltest.html
.I think it may be that the dest is not updating in the tags collection. The new dest shows up here:
but not here: