Closed atifsyedali closed 4 years ago
Nice idea! But I think you are speaking about [[index]], since [[toc]] is for within a file and can already be ordered.
I don't have time to do it anytime soon, but that should be not too difficult to implement: https://github.com/sinedied/hads/blob/master/lib/renderer.js#L61
I you want to take a look at it I'll gladly accept a PR 😃
Oh yes, I mean [[index]]. Will have a look next week.
Also, the README.md file should always be the first one in the list of children.
Would be nice to define some ordering in [[toc]]. I saw one Markdown system (don't remember which) that allowed files to be prefixed with a number
xyz-
(e.g.001-intro
,002-background
), and then while injecting the ToC would strip that prefixes out. Ordering maintained without extra effort.