An Odd SassDoc theme.

> If it's not documented, it doesn't exist.
> Documentation should become the default --
> an integrated part of the development process.
>
> ---Miriam Suzanne
At [OddBird][oddbird],
we wanted better tools for documenting
the entire front end of a project --
from brand guidelines to UX patterns and code APIs:
- Documenting the intersection of languages and styles
- Written directly in the code,
and integrated with code architecture
- Automated for a document that grows and changes
along with the life of your project
Herman is built as an extension to [SassDoc][sassdoc],
and supports all their core functionality
with additional support for
[font specimens][font-docs], [color palettes][color-preview],
[sizes and ratios][size-preview], [SVG icons][icon-docs],
[compiled languages][example-docs], Nunjucks/Jinja macros, HTML previews,
and more.
[font-docs]: https://www.oddbird.net/herman/docs/demo_fonts
[color-preview]: https://www.oddbird.net/herman/docs/demo_colors
[size-preview]: https://www.oddbird.net/herman/docs/demo_sizes
[icon-docs]: https://www.oddbird.net/herman/docs/demo_icons
[example-docs]: https://www.oddbird.net/herman/docs/demo_examples
``bash`
npm install sassdoc sassdoc-theme-herman
Note: Dart Sass (sass)
is required to use Herman
to display samples of Sass/Scss code.
If it's not already installed in your project,
install it along with Herman:
`bash`
npm install sass
See the SassDoc documentation
to run SassDoc via various build tools.
Specify herman as the theme
in your SassDoc options:
`bash`
sassdoc
Currently,
all SassDoc/Herman annotations are written as Sass comments
starting with /// to differentiate documentation//
from other developer comments ().
`scss`
// This comment will be ignored by Herman
/// This comment will be rendered in the documentation
Annotation comments can be free-floating,
or attached to a particular Sass/CSS object --
such as a variable, mixin, function, or selector block.
Note that while SassDoc allows annotation comments
to be separated from the documented code by newlines,
Herman considers documentation to be free-floating "prose" if
it is separated from documented code by one or more newlines.
`scss
/// this is a free-floating comment
/// this comment is attached to the following mixin code-block
@mixin sample-object { … }
`
In addition to the core SassDoc annotations,
our [@icons annotation][icon-docs] allows you to@example
display SVG icons from a given folder,
and we extend the core [ annotation][example-docs]@font
to display compiled Sass/Nunjucks output
and render sample components.
We also provide a [ annotation][font-docs]@colors
for displaying font-specimens,
and , @sizes, and @ratios` annotations
for displaying [color-palettes][color-preview],
[text and spacing sizes, and modular ratios][size-preview].
[herman]: https://www.oddbird.net/herman/
[oddbird]: https://www.oddbird.net/
[sassdoc]: http://sassdoc.com/
[See the full documentation for details »][docs]
[docs]: https://www.oddbird.net/herman/docs/configuration
Herman uses a number of SassDoc Extras:
- Description
- Display
- GroupName
- ShortcutIcon
- Sort
- ResolveVariables