ptrkstr/markdownchildrenkit
MarkdownChildrenKit
Example
GIVEN a readme.md file exists
My favourite things are:
<!-- markdown-children:start -->
<!-- markdown-children:end --><details> <summary>AND it's in this directory</summary> <img src="Assets/readme/given.png" height="300pt" alt="Directory of files and folders"> </details>
<details> <summary>WHEN MarkdownChildrenKit is invoked</summary>
try MarkdownChildren().process(.init(
url: URL(string: "../readme.md",
nameType: .useH1,
tagStart: "<!-- markdown-children:start -->",
tagEnd: "<!-- markdown-children:end -->",
saver: saver
))</details>
THEN the readme.md turns into:
My favourite things are:
<!-- markdown-children:start -->
- [Animals](animals.md)
- animals
- pets
- [Cats](animals/pets/cats.md)
- [Dogs](animals/pets/dogs.md)
- zoo
- [Tiger](animals/zoo/tiger.md)
- [Clothes](clothes.md)
- clothes
- summer
- [Dress](clothes/summer/dress.md)
- [Hat](clothes/summer/hat.md)
- winter
- [Jumper](clothes/winter/jumper.md)
- [Pants](clothes/winter/pants.md)
<!-- markdown-children:end -->Installation
SPM
Add the following to your project:
https://github.com/ptrkstr/MarkdownChildrenKitTODO
- [ ] Option - Choose list node (
-,*or+) - [ ] Option - Skip folder if it doesn't contain any markdown files
Package Metadata
Repository: ptrkstr/markdownchildrenkit
Default branch: master
README: README.md