hologram icon indicating copy to clipboard operation
hologram copied to clipboard

Improve structure and semantics of output

Open chris-canipe opened this issue 10 years ago • 5 comments

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.)

chris-canipe avatar Apr 06 '15 17:04 chris-canipe

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

lifeiscontent avatar Apr 12 '15 17:04 lifeiscontent

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.

rishabh-ink avatar Jul 19 '15 15:07 rishabh-ink

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?

wilson-huynh-webjet avatar Jan 22 '16 01:01 wilson-huynh-webjet

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 :)

ffoodd avatar Mar 23 '16 08:03 ffoodd

@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!

rishabh-ink avatar Jun 23 '16 13:06 rishabh-ink