A markdown based documentation system for style guides.

Related tags

CSS hologram
Overview

Hologram

Gem Version Build Status Code Climate Dependency Status License

Hologram is a Ruby gem that parses comments in your CSS and helps you turn them into a beautiful style guide.

There are two steps to building a great style guide:

  1. Documenting your css and javascript, and generating html examples.
  2. Styling the output of step 1.

The hologram gem itself is only concerned with step 1. This means you are free to make your style guide look however you would like. If you don't feel like going through this process yourself, you can take a look at the templates in our example repository, and use the assets defined there instead.

Installation

Add this line to your application's Gemfile:

gem 'hologram'

And then execute:

$ bundle

If you don't use bundler you can run gem install hologram.

Quick Start

hologram init

This will create a hologram_config.yml file (more on this below), starter _header.html and _footer.html files, and starter templates for rendering code examples. You can then tweak the config values and start documenting your css.

Add some documentation to one of your stylesheets:

/*doc
---
title: Alert
name: alert
category: basics
---
```html_example
    <div class='alert'>Hello</div>
```
*/

Building the documentation is simply:

hologram

Command line flags

Hologram has a couple of command line flags:

  • -c or --config - specify the config file, by default hologram looks for hologram_config.yml

Details

There are two things you need to do to start using hologram:

  1. Create a YAML config file for your project.

  2. Go document some code!

Creating a YAML config file

Hologram needs a few configuration settings before it can begin to build your documentation for you. Once this is set up, you can execute hologram by simply running:

hologram path/to/your/config.yml or (using bundler) bundle exec hologram path/to/your/config.yml

Your config file needs to contain the following key/value pairs

  • source: relative path(s) to your source files. Accepts either a single value or an array

  • destination: relative path where you want the documentation to be built

  • documentation_assets: The path that contains supporting assets for the documentation page. This typically includes html fragments (header/footer, etc), style guide specific CSS, javascript and any images. Hologram specifically looks for two files: _header.html and _footer.html. These are used to start and end every html page hologram generates.

    Hologram treats _header.html and _footer.html as ERB files for each page that is generated. You can access the title, file_name, blocks, and categories.

    blocks is a list of each documentation block on the page. Each item in the list has a title, name, category, and optionally a parent. This is useful for, say, building a menu that lists each component.

    categories is a list of all the categories found in the documentation

    Nota Bene: Filenames that begin with underscores will not be copied into the destination folder.

  • code_example_templates: (optional) Hologram uses the files in this folder to format the code examples in the styleguide. The initializer generates 4 files:

    • markup_example_template.html.erb - used for html, haml and slim examples

    • markup_table_template.html.erb - used for multiple html, haml and slim examples layed out in a table (see the tabular layout docs for more information)

    • js_example_template.html.erb - used for js examples

    • jsx_example_template.html.erb - used for jsx examples

    The html in the files will be rendered for every code example in the styleguide. The variable rendered_example represents the html generated by the example, while the variable code_example represents the formatted and escaped code behind the example.

    See the documentation on custom code renderers for more information,

    Nota Bene: If template files are missing, or this folder does not exist, hologram will use default templates.

  • code_example_renderers: (optional) A folder that contains your custom code renderers. For example, if you want to have coffee_examples in your code, write a coffeescript renderer and place it in this folder. See #custom_code_example_renders for more inforamtion on this.

  • custom_markdown: (optional) this is the filename of a class that extends RedCarpet::Render::HTML class. Use this for when you need additional classes or html tags for different parts of the page. See [example_markdown_renderer.rb.example] (example_markdown_renderer.rb.example) for an example of what your class can look like.

  • index: (optional) this is a category (see Documenting your styles section below) that will be used as the index.html.

  • dependencies: a list of relative paths to folders containing any dependencies your style guide has. These folders will be copied over into the documentation output directory. ENSURE THE CSS/JS THAT IS ACTUALLY BEING DOCUMENTED IS LISTED HERE. You will also need to ensure that they are included on your pages. A simple way to do this is to add <link> and <script src=> tags to the _header.html file.

  • ignore_paths: (optional) a list of paths to ignore. This can be a file name or a glob. Be sure to wrap globs in double quotes to keep yaml from getting too upset (ie good:".erb" vs bad:.erb).

  • nav_level: (optional) Sets the level of section navigation desired. section sets it to show sub navigation in top level sections. all sets it to show sub navigation for all sections. all can be a bit much, you'll probably want section.

  • custom_extensions: (optional) Additional file extensions that will be included in the parse. Accepts both a single value and an array. The current supported file extensions are .css, .scss, .less, .sass, .styl, .js, .md, .markdown and .erb.

  • exit_on_warnings: (optional) Hologram displays warnings when there are issues with your docs (e.g. if a component's parent is not found, if the _header.html and/or _footer.html files aren't found) If you want Hologram to exit on these warnings, set the value to 'true' (Default value is 'false')

Example config file
# Hologram will run from same directory where this config file resides
# All paths should be relative to there

# The directory containing the source files to parse recursively
source: ./sass

# You may alternately specify multiple directories.
# source:
#  - ./sass
#  - ./library-sass

# The directory that hologram will build to
destination: ./docs

# The assets needed to build the docs (includes header.html,
# footer.html, etc)
# You may put doc related assets here too: images, css, etc.
documentation_assets: ./doc_assets

# The folder that contains templates for rendering code examples.
# If you want to change the way code examples appear in the styleguide,
# modify the files in this folder
code_example_templates: ./code_example_templates

# The folder that contains custom code example renderers.
# If you want to create additional renderers that are not provided
# by Hologram (i.e. coffeescript renderer, jade renderer, etc)
# place them in this folder
code_example_renderers: ./code_example_renderers

# Any other asset folders that need to be copied to the destination
# folder. Typically this will include the css that you are trying to
# document. May also include additional folders as needed.
dependencies:
  - ./build

# Mark which category should be the index page
# Alternatively, you may have an index.md in the source directory root
# folder instead of specifying this config.
index: basics

# To output navigation for top level sections, set the value to
# 'section'. To output navigation for sub-sections, set the value to `all`
nav_level: all

# Hologram displays warnings when there are issues with your docs
# (e.g. if a component's parent is not found, if the _header.html and/or
#  _footer.html files aren't found)
# If you want Hologram to exit on these warnings, set the value to 'true'
# (Default value is 'false')
exit_on_warnings: false

Documenting your styles and components

Hologram will scan for stylesheets (.css, .scss, .sass, .less, or .styl) and javascript source files (.js) within the source directory defined in your configuration. It will look for comments that match the following:

/*doc
---
title: Buttons
name: button
category: Base CSS
---

Button styles can be applied to any element. Typically you'll want
to use either a `<button>` or an `<a>` element:

```html_example <button class="btn btnDefault">Click</button> <a
class="btn btnDefault" href="trulia.com">Trulia!</a> ```

If your button is actually a link to another page, please use the
`<a>` element, while if your button performs an action, such as
submitting a form or triggering some javascript event, then use a
`<button>` element.

*/

NB: Sass users who are using the .sass flavor of Sass should use //doc style comments with indents to create their comment blocks.

The first section of the comment is a YAML block that defines certain aspects of this documentation block (more on that in the next section). The second part is simply markdown as defined by Redcarpet.

Notice the use of html_example. This tells the markdown renderer that it should treat the example as...well...html. If your project uses haml you can also use haml_example. In that case the output will be html for the example and the code block will show the haml used to generate the html.

For components that require javascript you can use js_example. In addition to outputting the javascript in a <code> block it will also wrap it in a <script> tag for execution.

Additionally, html elements that are generated via markdown will have a class styleguide appended to them. You can use this to apply css to the styleguide itself.

Tabular layout for component documentation

If you want the code snippet next to the rendered component, instead of below, render your component horizontally by applying the html_example_table or haml_example_table modifiers to the code block.

/*doc
---
title: Buttons
name: button
category: Base CSS
---

```html_example_table
<button class="btn btnDefault">Click</button>

<a class="btn btnDefault" href="trulia.com">Trulia!</a>
```

*/

NB: Components separated by a blank line will be rendered as separate table rows.

Referencing other components

For some components, you may want to reference the documentation of another component. As an example, you may want your link components to link to the button documentation.

/*doc
---
title: Links
name: links
category: Other Category
---

...

You may want to use a button for a link.
See [the button documentation][button] for more info.

*/

You can use a reference link of the form [link description][component_name] to link to any other component in the styleguide. These links will even work if the referenced component belongs to a different category.

Document YAML section

The YAML in the documentation block can have any key/value pairs you deem important, but it specifically looks for the following keys:

  • title: The title to display in the documents
  • category/categories: This is the broad categories for the component, all components in the same category will be written to the same page. It can be set to either a string or a YAML array. If you use an array, the component will be written to both pages. Note: There is no need to set a category if this component has a parent.
  • name: This is used for grouping components, by assigning a name, a component can be referenced in another component as a parent. Note that items in the same category are sorted alphabetically by name.
  • parent: (Optional.) This should be the name of another component. If this is set, the current component will be displayed as a section within the parent's documentation, but only if it specifies the same category, or allows the category to be inherited from its parent.
  • hologram: (markdown only) To avoid conflicts with Jekyll and other YAML+markdown formats, Markdown (.md) files must include a hologram: true key/value pair in the YAML block to indicate that it is intended to be processed by Hologram.

For example, you might have a component with the name buttons and another component named buttonSkins. You could set the parent for the buttonSkins component to be buttons. It would then nest the buttonSkins documentation inside the buttons documentation.

Each level of nesting (components are infinitely nestable) will have a heading tag that represents its depth. In the above example buttons would have an <h1> and buttonSkins would have an <h2>.

You can see this exact example in our demo repo, and the output of this nesting in our demo style guide.

Documentation Assets

The documentation assets folder contains the html, css, js and images you'll need for making your style guide look beautiful.

Hologram doesn't care too much about what is in here as it is intended to be custom for your style guide.

Styling Your Code Examples

Hologram uses pygments.rb gem to provide syntax highlighting for code examples. One of the assets that you probably want to include in your documentation assets folder is a css file that styles the "pygmentized" code examples. We use github.css which can be found along with the css we use to style code blocks here.

Custom Code Example Renderers

By default, hologram supports the following code example types:

  • html_example and html_example_table
  • haml_example and haml_example_table
  • slim_example and slim_example_table
  • js_example
  • jsx_example

Let's say you want to include coffeescript examples in your styleguide. You'll need to create a custom renderer for this.

First, if none of the included templates (markup_example_template, js_example_template, etc) work for you, create new custom template files. In this example, let's say you have the templates my_custom_coffee_example_template.html.erb and my_custom_coffee_table_template.html.erb in your ./code_example_templates folder.

<!-- ./code_example_templates/my_custom_coffee_example_template.html.erb -->

<script><%= rendered_example %></script>
<div class="codeBlock coffeeExample">
  <div class="highlight">
    <pre><%= code_example %></pre>
  </div>
</div>
<!-- ./code_example_templates/my_custom_coffee_table_template.html.erb -->

<div class="codeTable">
  <table>
    <tbody>
      <% examples.each do |example| %>
        <tr>
          <td>
            <script><%= example.rendered_example %></script>
            <div class="codeBlock coffeeExample">
              <div class="highlight">
                <pre><%= example.code_example %></pre>
              </div>
            </div>
          </td>
        </tr>
      <% end %>
    </tbody>
  </table>
</div>

Next, create a custom renderer for coffeescript in the file ./code_example_renderers/coffee_renderer.rb.

# ./code_example_renderers/coffee_renderer.rb

require 'coffee-script'

Hologram::CodeExampleRenderer::Factory.define('coffee') do
  example_template 'my_custom_coffee_example_template'
  table_template 'my_custom_coffee_table_template'

  lexer { Rouge::Lexer.find(:coffee) }

  rendered_example do |code|
    CoffeeScript.compile(code)
  end
end

Now you should be able to render coffeescript examples in your styleguide. You can render single coffeescript examples...

$('#myDiv').click ->
  alert 'Oh wow we are rendering coffee script'

Or you can render coffeescript tables...

$('#myDiv').click ->
  alert 'Oh wow we are rendering coffee script'

$('#myOtherDiv').click ->
  console.log 'Yeah coffee script!'

$('#yetAnotherDiv').click ->
  window.location =

Here's some details on the code example renderer factory:

  • Hologram::CodeExampleRenderer::Factory.define(example_type, &block) - this is how you declare a custom renderer. example_type is the name of the renderer, and determines the example name. For example, if example_type was "foobar", in your styleguide you can create foobar_examples and foobar_example_tables

  • example_template - the name of the template used to render the example, minus the .html.erb extension (e.g. "markup_example_template"). It should live in your code_example_templates folder

  • table_template - (optional) the name of the template used to render examples in tabular form, minus the extension (e.g. "markup_table_template").

  • lexer - (optional) a Rogue Lexer that matches the syntax of your example (i.e. Rouge::Lexer.find(:haml), Rouge::Lexer.find(:ruby)). Here's a complete list of possible lexers. If this argument is not provided, hologram will guess what the best one is.

  • rendered_example - (optional) this is the set of instructions to "translate" your exaple so it can be rendered. I.e. for coffeescript to be "rendered" in the browser, you need to transform it to javascript (as can be seen in the block above). For haml, you need to transform it to html. If no block is provided, the code is rendered as is.

Supported Preprocessors/File Types

The following preprocessors/file types are supported by Hologram:

  • Sass (.scss, .sass)
  • Less (.less)
  • Stylus (.styl)
  • Vanilla CSS (.css)
  • Javascript (.js)
  • Markdown (.md, .markdown)

Extensions and Plugins

  • Guard Hologram is a sweet little gem that uses guard to monitor changes to your hologram project and rebuilds your style guide on the fly as you make changes.
  • Grunt Hologram is a sweet little grunt task that will generate your hologram style guide.
  • Hologram Plugin for Gulp is a gulp task for hologram.
  • Classname Clicker is a handy UI addition that gives the ability to see rules that apply to a classname by clicking on them within hologram.
  • Cortana is a theme for hologram. It also includes a handy search feature.
  • Hologram Github Theme is a Github Styleguide inspired theme for hologram.
  • Voxel Hologram is a minimal theme for Hologram.
  • Acme Styleguide is a starter project that helps Pivotal Labs Designers build living styleguides with Sass and Hologram.

Contributing

  1. Fork it
  2. Create your feature/bug fix branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Authors

Hologram is written and maintained by August Flanagan and JD Cantrell.

Contributors

These fine people have also contributed to making hologram a better gem:

License

Hologram is licensed under the MIT License

Comments
  • Make hologram works on Windows

    Make hologram works on Windows

    Hologram do not work on windows. I'm using the Power Shell. Ruby was installed with http://rubyinstaller.org and https://github.com/oneclick/rubyinstaller/wiki/Development-Kit

    I do have a hologram config files and it perfectly works on OSX.

    PS C:\myProject> hologram
    C:/Ruby200/lib/ruby/gems/2.0.0/gems/posix-spawn-0.3.8/lib/posix/
    'which' is not recognized as an internal or external command,
    operable program or batch file.
    (?°?°)?? ???  Build not complete.
     Could not load config file, try 'hologram init' to get started
    
    opened by gagarine 17
  • Allow greater level of category nesting

    Allow greater level of category nesting

    I'd love to be able to nest categories further. ex:

    ├── elements
    │   ├── _forms.sass
    │   ├── _lists.sass
    │   ├── _loader.sass
    │   ├── _tables.sass
    │   ├── buttons
    │   │   ├── _button.sass
    │   │   ├── _close-button.sass
    │   │   ├── _minor-button.sass
    │   │   └── _save-button.sass
    │   ├── forms
    │   │   ├── _input-labels.sass
    │   │   └── _text-inputs.sass
    │   ├── lists
    │   │   ├── _bare-list.sass
    │   │   ├── _line-list.sass
    │   │   ├── _list.sass
    │   │   └── _tabs.sass
    │   └── text
    │       ├── _copy.sass
    │       └── _headlines.sass
    ├── helpers
    │   ├── _formatters.sass
    │   └── _helpers.sass
    

    that way I can arrange by type, in this case:

    • elements
    • components
    • modules
    • helpers
    opened by VinSpee 17
  • Weird error ...

    Weird error ...

    I am getting this error when trying to render out hologram ...

    
    (erb):32:in `block in get_binding': undefined method `split' for nil:NilClass (NoMethodError)
        from (erb):31:in `each'
        from (erb):31:in `get_binding'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/erb.rb:849:in `eval'
        from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/erb.rb:849:in `result'
        from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:243:in `write_page'
        from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:199:in `block in write_docs'
        from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:185:in `each'
        from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:185:in `write_docs'
        from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:147:in `build_docs'
        from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/lib/hologram/doc_builder.rb:87:in `build'
        from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/lib/hologram/cli.rb:38:in `build'
        from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/lib/hologram/cli.rb:30:in `run'
        from /Library/Ruby/Gems/2.0.0/gems/hologram-1.4.0/bin/hologram:6:in `'
        from /usr/bin/hologram:23:in `load'
        from /usr/bin/hologram:23:in `
    '

    What does this typically means?

    Thanks

    bug 
    opened by kevinkashou 14
  • Multiple category support for components

    Multiple category support for components

    This pull request adds the ability to sort a component into two top level categories, for instance having an auto complete input show up under both the category "form" and "javascript". We specifically wanted this so we could have an "all" category to preserve on-page browser text search while at the same time being able to break things into smaller categories for easier browsing.

    • "category" accepts a comma separated list of categories or a single category
    • preserves the name category in the doc blocks yml for backwards compatibility. That may end up seeming awkward, in which case we can change it, but it seemed fine for now.

    Signed-off-by: Colin OByrne [email protected]

    opened by stubbornella 13
  • Tabular code examples

    Tabular code examples

    @montypivotal designed this cool interaction where simple components (like typography) can be laid out horizontally with their code snippet and a copy button that copies the code to the clipboard. You can see his mockup below.

    pui-16

    This is the first pull request toward making this possible. It allows you to indicate component examples that should be laid out in a table via the html_example_table and haml_example_table identifiers.

    We'll have a followup commit on the hologram-example repo that adds more docs about how to use this feature. We'll also followup in a separate commit with the copy-button functionality added via JS.

    What do you think? Any suggestions for improvement?

    Geoff & @stubbornella

    opened by gpleiss 12
  • `initialize': Is a directory

    `initialize': Is a directory

    Hi!

    I'm starting a component library using Hologram as the tool to generate it.

    I'm getting this error in my project and can't figure out what's causing it.

    Command failed: /Users/vince/.rvm/gems/ruby-1.9.3-p545/gems/hologram-1.0.1/lib/hologram/doc
    _builder.rb:200:in `initialize': Is a directory - /Users/vince/Projects/leveleleven/builder-component-library/build/ (Errno::EIS
    DIR)
    

    my hologram_config.yml:

    # Hologram will run from same directory where this config file resides
    # All paths should be relative to there
    
    # The directory containing the source files to parse recursively
    source: ./app/styles
    
    # The directory that hologram will build to
    destination: ./build
    
    # The assets needed to build the docs (includes header.html,
    # footer.html, etc)
    # You may put doc related assets here too: images, css, etc.
    documentation_assets: ./app/templates
    
    # Any other asset folders that need to be copied to the destination
    # folder. Typically this will include the css that you are trying to
    # document. May also include additional folders as needed.
    #dependencies:
    
    # Mark which category should be the index page
    # Alternatively, you may have an index.md in the documenatation assets
    # folder instead of specifying this configu.
    #index: basics
    

    Any ideas what I'm doing wrong?

    opened by VinSpee 12
  • Custom code example templates and renderers

    Custom code example templates and renderers

    This PR address #170

    Adds a new config option: code_example_templates. If a user wants to change the way code examples are rendered in the styleguide, they can add custom templates to this folder. Hologram will look for the following 4 templates:

    • markup_example_template.html.erb - used for html, haml and slim examples
    • markup_table_template.html.erb - used for multiple html, haml and slim examples layed out in a table
    • js_example_template.html.erb - used for js examples
    • jsx_example_template.html.erb - used for jsx examples

    As an example, the markup_example_template looks like this:

    <div class="codeExample">
      <div class="exampleOutput">
        <%= rendered_example %>
      </div>
      <div class="codeBlock">
        <div class="highlight">
          <pre>
            <%= code_example %>
          </pre>
        </div>
      </div>
    </div>
    

    Hologram will fall back on default templates if a user doesn't specify a folder for code_example_templates in their config file (or if certain template files are not found). So this isn't a breaking change :dancer:

    This PR restructures the BlockCodeRenderer (again... :cold_sweat: ), but I think that the code is now much more modular. I think this new code will make it easier to get Hologram to the point where users can add their own languages in a simpler way.

    Best! Geoff (cc/ @stubbornella @bebepeng @pivotal-plech)

    opened by gpleiss 11
  • adding Sass's multi-line comment syntax to docs

    adding Sass's multi-line comment syntax to docs

    I imagine using Hologram in addition to my normal Compass or SassC compiling, not in place of it.

    To do this without getting errors, you need to use Sass's multi-line comments "//". but the docs only have single line: "/*".

    I'm sure future developers would appreciate that in the docs, it's a bit of a nuance.

    documentation 
    opened by gvinter 11
  • Dynamic stylesheet/script inclusion

    Dynamic stylesheet/script inclusion

    Hi !

    First, I want to say that your tool is really cool. We test so many styleguide generators, but yours seems to be one of the best for our needs.

    Anyway, last week I create a nicer theme for Hologram called Cortana and I see something important is missing : the dynamic inclusion of used stylesheet and scripts into the build. In the config file we define the path of all the files which will be parse and use to build the doc, but we have always to include manually all those files in the theme to render our examples.

    Can you do something to reuse the source config and dynamically include all the css/js files in the final doc build ?

    enhancement 
    opened by Yago 10
  • Add optional

    Add optional "copy" button for code examples - or be able to modify the way code examples render

    @montypivotal designed this styleguide for us. We want to have a copy button for our code examples, as seen in the mockup.

    styleguide

    It looks like adding a copy button is pretty simple with ZeroClipboard. However, we need to modify the code example template to get the copy buttons in there.

    A few implementation options:

    1. On our project, we could extend the Hologram::MarkdownRenderer and override the block_code method so it creates a copy button. (So no PR)

    2. We think that others might like a copy button on their styleguides, so we could make a PR to include a configurable options that adds copy buttons.

    3. To make this even more configurable, there could be a option to change the code example template. For example, you could include a _code_example.html file to your documentation assets folder that looks something like this:

      <div class="codeExample">
        <div class="exampleOutput">
          <%= rendered_example %>
        </div>
        <div class="codeBlock">
          <div class="highlight">
            <pre>
              <%= code_example %>
            </pre>
          </div>
        </div>
        <button class="copy-button" data-clipboard-text="Copy Me!" title="Click to copy me.">
          Copy to Clipboard
        </button>
      </div>
      

    We'd be willing to submit a PR for any of these options :) What do you think is best?

    @gpleiss, @bebepeng, @drpep, @stubbornella

    opened by gpleiss 9
  • Hologram always assumes ERB files should be executed

    Hologram always assumes ERB files should be executed

    This might be a bit tricky to get right, but it appears that as of v1.1.0, Hologram assumes that any ERB file should be executed to generate a page in the style guide.

    This probably makes sense if you're using it to generate a sample JSON file to give some JS something to play with, but it breaks Rails assets that use ERB. For instance, one might have a file like sprites.css.erb, which is a CSS file that relies on Rails helpers.

    If any files like this exist in the directory specified by source in the yaml config, Hologram will either generate a sprites.css file in destination directory, or crash if the file needs any Rails helpers.

    Perhaps Hologram's DocBuilder could only call write_erb if the file looks like it's either a straight ERB file, ie: readme.erb or an html erb file like readme.html.erb, and just document the file otherwise.

    opened by adamsanderson 9
  • Loop in the Markdown

    Loop in the Markdown

    Hello, I am creating the styleguide and I have many similar css classes for color. I don't want to type a lot of similar text in the the example block. is there a way to create a loop in the markdown?

    opened by pavliukpetro 1
  • Provide a means to set order to nav and section items

    Provide a means to set order to nav and section items

    For the main nav there is currently no way to set their order/priority. If they were classed with their name this could be one method to accomplish it.

    For sub sections we currently have to prefix their name with an index (number or letter) to force the order we want. This gets messy when we need to move sections around or add new ones into the order, having to update the naming for all the others.

    opened by ChrisCorrigan 0
  • Primary menu is not useful in its current state

    Primary menu is not useful in its current state

    [Note: by primary menu I don't mean the top level nav - I mean the top level menu for the sections in the content. It renders as an unclassed ul without any sub ul hierarchy. ]

    I end up doing display: none; on the primary menu, as it contains no hierarchy within the lists - all sections and sub-sections are at the same first level. There are no classes generated to differentiate as well (unlike .section-nav). As a result all of the top level sections below the fold are unknown without a proper primary menu.

    opened by ChrisCorrigan 0
  • Clean up

    Clean up "Build completed" message

    Multiple members of my team were distracted by this emoticon, which is backwards from the traditional version (in this country anyway), :) — somehow it always looks like a :( frown as it slides by on the console.

    Also took the opportunity to add "Hologram", since in our situation where you're scanning a lot of build output, it's helpful to be specific about what just finished.

    • Remove distracting backwards emoticon
    • Add “Hologram”, which is helpful messaging in a multiple-build situation
    opened by whatcould 0
[ON HOLD] Living Style Guides Engine and Maintenance Environment for Front-end Components. Core repository.

[ON HOLD] SourceJS - Living Style Guide Platform The project been stale for a while and currently is in the [ON HOLD] state until we find new maintain

SourceJS 552 Nov 8, 2022
Markdown-based styleguide generator

Styledown Write maintainable CSS styleguides efficiently using a Markdown. See example ▸ Installation $ npm install -g styledown $ styledown --help Ho

Styledown 674 Nov 21, 2022
Write your resume in Markdown online.

Oh, Resume! Word and LaTex are too overkill for a resume. So why not write it in Markdown? Have fun: oh-resume.zxh.io WIP Notice Highly recommend usin

Xiaohan Zou 42 Dec 24, 2022
Dropbox’s (S)CSS authoring style guide

Dropbox (S)CSS Style Guide “Every line of code should appear to be written by a single person, no matter the number of contributors.” —@mdo General Do

Dropbox 890 Jan 4, 2023
Automatically generate a style guide from your stylesheets.

StyleDocco StyleDocco generates documentation and style guide documents from your stylesheets. Stylesheet comments will be parsed through Markdown and

Jacob Rask 1.1k Sep 24, 2022
styled component for react & style-loader/usable

react-styled ES7 decorator for dynamic stylesheet usage w/ webpack install $ npm install bloody-react-styled --save-dev require import styled from "bl

Matthias Le Brun 37 Sep 26, 2022
Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress 💅

Visual primitives for the component age. Use the best bits of ES6 and CSS to style your apps without stress ?? Looking for v5? The master branch is un

styled-components 38k Dec 31, 2022
🐒 Normalize browsers' default style

My open source work is supported by the community Special thanks to: Differences from normalize.css Smaller Includes only normalizations for the lates

Sindre Sorhus 4.8k Jan 3, 2023
NES-style CSS Framework | ファミコン風CSSフレームワーク

日本語 / 简体中文 / Español / Português / Русский / Français NES.css is a NES-style(8bit-like) CSS Framework. Installation Styles NES.css is available via ei

null 19.2k Jan 5, 2023
The CSS design system that powers GitHub

Primer CSS The CSS implementation of GitHub's Primer Design System Migrating ?? If you currently use the primer or primer--prefixed npm packages, plea

Primer 11.6k Jan 3, 2023
Salesforce Lightning Design System

Salesforce Lightning Design System Welcome to the source code repository for Salesforce Lightning Design System, brought to you by Salesforce UX. SLDS

Salesforce UX 3.4k Dec 29, 2022
Reasonable System for CSS Stylesheet Structure

Viewing this from GitHub? Visit the website for the full experience. rscss.io → rscss Styling CSS without losing your sanity Reasonable System for CSS

Rico Sta. Cruz 3.9k Dec 21, 2022
:mountain_bicyclist: Landing Pages of Ant Design System

Ant Design Landing Landing Pages of Ant Design System English | 简体中文 What is Landing? Landing is a template built by Ant Motion's motion components. I

Ant Design Team 5.2k Dec 31, 2022
A nas system

火星一云/sparkCloud 这是一个类似于nas的个人项目,布置好服务器后,可以在线观看视频,可以实现文件的上传和下载。 技术 前后端分离的项目。前端是spa应用,使用react全家桶完成,分别适配了pc端和移动端,用videojs实现视频的播放。后端用nodejs完成,主要用express,数

null 69 Dec 26, 2022
Orange Design System theme for Storybook

ODS Storybook Theme Orange Design System Storybook Theme provides a Storybook theme for Orange. Quick start Install with npm: npm install ods-storyboo

Orange 3 Jan 10, 2022
An Ember-flavoured Bootstrap 4.x eco-system

ui-bootstrap Adds a complete Ember Bootstrap 4.x eco-system THIS IS CURRENTLY A WORK IN PROGRESS ... it works but it will be "ready" pretty soon Insta

LifeGadget 12 Jan 25, 2021
Standalone keycloak theme using Système de Design de l'État (french government design system)

keycloak-dsfr This template has been made thanks to keycloakify. It follows the french design system Système de Design de l'État. You can find guideli

Fabrique numérique des Ministères Sociaux 4 May 25, 2022
implementing a hook to listen to system theme changes! it could be a good lib, who knows? 😏

This is a Next.js project bootstrapped with create-next-app. Getting Started First, run the development server: npm run dev # or yarn dev Open http://

José Tone 4 Jan 15, 2022