minidocs icon indicating copy to clipboard operation
minidocs copied to clipboard

[Discussion] very custom styles - support using external components or ?

Open joehand opened this issue 7 years ago • 2 comments

Hey, so we wanted to get the Dat docs a bit more consistent style-wise with everything else. This ended up requiring me to fork and modify the minidocs components to get this result. We'd rather not diverge from any more work that goes on here, opening this for discussion + thoughts on how to move forward.

My fork mostly supports the example docs. I cut a few corners and there are a few hardcoded things (mainly the navigation links in header). There were a few options for how a more custom style could be supported in minidocs:

  • Change default style to use header
  • Add option to use header instead of logo/title in sidebar
  • Add option to allow custom components, essentially allowing external modules here as an option.

Change Default Style

Change the default minidocs style completely to use the header. This is mostly done in the fork, as I was using the example folder in development. There were a few hardcoded things that would need to be addressed.

Externally, this would be the smallest change in development (but a large change in style). We could probably accomplish this with a minor version update and adding a single option (for the navigation links).

Header Option

Support the default style and a style that has the header. I think this is a good middle ground that wouldn't require too much external customization. I'd lean towards this one since it wouldn't be a huge amount of work but would let both styles co-exist.

The changes I made ended up being a pretty big fork of the minidocs/components because of how sidebar styling was done previously. Reconciling the two in order to support both is definitely possible. The main task would be thinking through how to set the header option and add any navigation links in the header.

We could also do this with a minor version, adding an option to use the header styles and the navigation links.

Custom Components

Minidocs parsing and stuff is the really powerful part of this module. This option would allow for anyone to build custom styles on top of the minidocs parsing engine.

This would be pretty cool, but this option is probably the most work. We'd have to separate out the default components from the parsing stuff and add options to use an external component for styling.

See also:

joehand avatar Jun 05 '17 18:06 joehand