vectordotdev / gitdocs

Easy to use, SEO-friendly, beautiful documentation that lives in your git repo.
https://gitdocs.netlify.com
Other
261 stars 25 forks source link

Expose front matter in db.json #149

Closed binarylogic closed 6 years ago

binarylogic commented 6 years ago

As part of our work to integrate Gitdocs in the Timber.io service we need the ability to tag various documents. The intent is to allow users to search Timber installation documents by tag. For example, the Ruby Installation document might have ruby, language, http, and stdout as tags.

My thought is that we'd include a tags front-matter key:

tags: ruby, language, http, stdout

And then make it available through db.json. To avoid future issues like this we should expose all front-matter in db.json.

jsonmaur commented 6 years ago

I've added the ability to tag pages with front matter, but it may take some more thought/restructuring on how to/whether or not to add all the front matter. The db file is currently built off of the manifest object, and the manifest whitelists all the valid front matter. Will think more about this.