Uh oh!
There was an error while loading. Please reload this page.
Add auto-generated index to knowledge base - #212
Conversation
fhemberger
commented
Oct 7, 2015
You can use collections for that: .use(collections({knowledge: {pattern: 'knowledge/**/*.md',refer: false},
…In a template you can then iterate over the collection: We already do the same for blog posts, TSC minutes, etc. |
Qard
commented
Oct 7, 2015
Oh, cool. Good to know. Sorry, I'm a bit of a noob to metalsmith. What about the tag grouping idea? Is there collection nesting? It'd be nice to have a more automated way to group and sort the knowledge base docs. I'll take another pass at it in the morning. 😸 |
fhemberger
commented
Oct 7, 2015
We created different sub-collections for the blog as well: https://github.com/nodejs/new.nodejs.org/blob/master/build.js#L68 I haven't checked all the new docs yet, so I can't tell you what grouping makes sense. Will try to have a first look later. |
Qard
commented
Oct 7, 2015
The knowledge base md files have both folder structure arrangements and tags. Both of which will probably change a bunch over time, so manually defining each collection like what has been done with the blog is somewhat un-ideal. I'll do some digging to see if there's a better way. |
mikeal
commented
Oct 7, 2015
+1 this is the existing structure from the nodejitsu docs. Even if we want to alter the structure it would be less work to shift a few things around and maintain the folder structure. |
Qard
commented
Oct 7, 2015
The "knowledge base" thing overlaps with the docs wg plan of having "guides" type docs. My thought was that those would probably get merged eventually. |
mikeal
commented
Oct 7, 2015
Ya, should probably merge the guides in at some point. Not sure if there are any format differences. |
Qard
commented
Oct 7, 2015
The docs wg has less stuff currently, so it might make the most sense to make it conform to the knowledge base format. I've opened some PRs to port the docs commits over here. The tracking issue for that is here: nodejs/docs#44 |
Qard
commented
Oct 7, 2015
I tried the layout approach. Not too sure about the sidebar code duplication though. |
fhemberger
commented
Oct 16, 2015
Related to #211 (waiting for ok for copyright transfer), thus flagged as 'do not merge' for now. |
mikeal
commented
Oct 16, 2015
actually, we can merge this because it's against the knowledge-base branch and not master. |
Qard
commented
Oct 16, 2015
Yep, if you are satisfied with it, feel free to merge. Otherwise, let me know if you want any further changes. :) |
Add auto-generated index to knowledge base
fhemberger
commented
Oct 20, 2015
Merged into |
This a quick pass at auto-generating a list of links to the knowledge base pages supplied in #211. I might also try grouping links into sections based on the tags data. Thoughts?