Themes
sethvincent opened this issue · 0 comments
sethvincent commented
In the readme there's a mention of adding support for themes. Making an issue for it!
I'm imagining that a theme for minidocs would just be a css file.
The cli would have a --theme
option:
minidocs site/ -c contents.js --theme theme.css
The js api would have an option:
var minidocs = require('minidocs')
var read = require('read-directory')
var app = minidocs({
contents: contents,
markdown: read.sync('./markdown', { extensions: false }),
theme: './theme.css'
})
var tree = app.start()
document.body.appendChild(tree)
With our existing style
option, which is additive, the default css is still included.
The theme
option would disable most of the built-in css and replace it with the theme css.
It could be more than a css file maybe, but that would be a lot more complicated.
I'm not sure how best to specify codemirror styles in a theme. They could be defined inside the theme.css file and it could be passed to codemirror. Customizing codemirror styles might actually be a separate issue/option.