Open chris-canipe opened 9 years ago
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!
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...
<h1>
)<p>
, etc.)<h1>
)<p>
, etc.)...and I propose a sectioned approach like:
<section>
)<h1>
)<p>
, etc.)<section>
)<h1>
)<p>
, etc.)