Closed dominikwilkowski closed 9 years ago
Check this out: https://gist.github.com/dominikwilkowski/4fd678b22b0a87d49fa1
This is how we do it now... All we would have to do is write something that generates the json... generating this navigation, however deep, is very fast (I'm looking at you TFNSW project)
That looks good — so we need a way to traverse a directory of files (and directories), create a JSON file based on it.
And thoughts about a GUI?
The GUI could be anything... preferably a web app to give you drag and drop ability?
This way we don't have to write anything in every single file and only touch the json. Also generating the nav is very quick plus stable and customisable...
I was actually under the impression that jekyll would give you a nested view of all pages but you could just not sort them... I just investigated this and that's wrong. Jekyll gives you a flat json for each page regardless of nesting which kind of sucks :) We could compare this with the json and only spit out the missing pages from the json in a json syntax for easy copy pasting for now?!...
I just updated the gist with a check against the json: https://gist.github.com/dominikwilkowski/4fd678b22b0a87d49fa1
This spits out the missing pages not included in the navigation json in case someone has create a new page. It is already formated in the json format and can be easily pasted into the appropriate section. This at least helps a bit.
@dominikwilkowski is this done now?
yeah I guess :) better navigation is the weight driven one here though: https://gist.github.com/dominikwilkowski/c7d916c9b36e4eebbc90
There are some existing attempts but nothing awesome:
Issue involves having to manually adjust either a
weight
value on each page, or some other numeric value.Would be great to have some kind of UI where pages were represented as some kind of document structure where you can drag and drop. This would update the weight value in the YAML front matter of the pages.
Or something else?