Closed Melindrea closed 9 years ago
Coincidentally I just started working on updating this for assemble v0.6.0. I'll update when it's ready
Thanks, sounds good =)
I'll work on other things, and if the permalinks aren't done in time for my next version, I should hopefully be able to juryrig an ugly placeholder!
lol, I know the feeling. I'm in a similar position so I want to get this done!
If there's any particular bit I can help with, let me know
Awesome thanks. Any feedback on what features you want to see would be great. I haven't decide how much I'm going to stick to the original feature set
I'll think over that some. I managed to get the most naive implementation possible for my current set of pages, but my real website will also need a blog with categories/tags/etc.
Naive implementation:
.pipe(rename(function (path) {
if (path.basename !== 'index') {
path.dirname += '/' + path.basename;
path.basename = 'index';
} else {
path.dirname = '.';
}
}))
Aka, if it's index it is in the same folder, if not it gets moved to basename/index.html
I'm not renaming the extension, since I use gulp-extname (which I kind-of figure I'll want to keep later as well).
Thanks, that helps!
Sent from my iPhone
On Mar 10, 2015, at 6:25 PM, Marie Hogebrandt notifications@github.com wrote:
I'll think over that some. I managed to get the most naive implementation possible for my current set of pages, but my real website will also need a blog with categories/tags/etc.
Naive implementation:
.pipe(rename(function (path) {
if (path.basename !== 'index') { path.dirname += '/' + path.basename; path.basename = 'index'; } else { path.dirname = '.'; } }))
Aka, if it's index it is in the same folder, if not it gets moved to basename/index.html
I'm not renaming the extension, since I use gulp-extname (which I kind-of figure I'll want to keep later as well).
— Reply to this email directly or view it on GitHub.
And just confirmed that it works with at least three levels of subfolders, and with a page called stories.md
alongside the folder stories
, nesting it properly.
Okay, so disregard this ATM. It printed out the paths correctly ... but it apparently didn't like the idea of giving them the right content!
So, here's the scoop:
When I change the basename of the file, it looses its' layout, though it appears like it will pick up other layouts if they match the basename. That is, I have a specific layout for my index.md
file, and if I rename the other files to some-folder/index.html
they pick up the index
layout. If I rename them some-folder/default.html
it looses the layout.
being implemented as a middleware in 0.6
How would I go about using this middleware (or get the same effect) in v0.6? I'm not needing anything too advanced, just standard 'pretty links' and some subfolders. That is: