trulia / hologram

A markdown based documentation system for style guides.

Home Page:http://trulia.github.io/hologram

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve structure and semantics of output

chris-canipe opened this issue · comments

commented

It would be great if individual sections were sectioned in the output. It would improve the structure and semantics while offering better ways to scope CSS or JS.

For example, the markup of this page takes the general form of...

  1. Heading (<h1>)
  2. Content (<p>, etc.)
  3. Heading (<h1>)
  4. Content (<p>, etc.)

...and I propose a sectioned approach like:

  1. Section (<section>)
    1. Heading (<h1>)
    2. Content (<p>, etc.)
  2. Section (<section>)
    1. Heading (<h1>)
    2. Content (<p>, etc.)
commented

even better, allow for a custom template to wrap around the generated content

This is possible by using a custom renderer. See the example_markdown_renderer on how to customize the output. You also need to set the custom_markdown property to point to your custom renderer file in the Hologram config file.

Sorry I'm new to this.
I tried the example_markdown_renderer.rb and get error:
" uninitialized constant ExampleMarkdownRenderer::Pygments (NameError)"
Can you please tell me if I miss any thing?

May I ask for help in this too?

I don't see anything like headings in the example renderer you're linking too, but only code example blocks. Am I missing something?

Thanks :)

@wilson-huynh-webjet @ffoodd Sorry for the delayed reply; didn't see the notification. In a theme that I created for Hologram, voxel-hologram, I was able to wrap each code snippet and example in a custom wrapper element. Please see markup_example_template.html.erb.

The file name, markup_example_template, is used by the HTML renderer in Hologram. See the section Creating a YAML config file.

Please share a link to your repo where you're trying this out. I'll be able to understand your problem better and help out. Thanks!