Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve structure and semantics of output #219

Open
chris-canipe opened this issue Apr 6, 2015 · 5 comments
Open

Improve structure and semantics of output #219

chris-canipe opened this issue Apr 6, 2015 · 5 comments

Comments

@chris-canipe
Copy link

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.)
@lifeiscontent
Copy link

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

@rishabh-ink
Copy link
Contributor

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.

@wilson-huynh-webjet
Copy link

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?

@ffoodd
Copy link

ffoodd commented Mar 23, 2016

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

@rishabh-ink
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants