Replies: 2 comments 5 replies
-
This sounds like a clash with a specific bootstrap layout and your page structure. Can you modify the css? |
Beta Was this translation helpful? Give feedback.
5 replies
-
Here's my paired shortcode:
And in a markdown file, I can do this:
The html output is this:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Using Eleventy 1.0.2 to generate a site. The HTML layout uses a fixed top navbar from Bootstrap. A table of content is generated using the "eleventy-plugin-toc" plugin.
The problem I faced is that because of the fixed top navbar, the anchor links generated by the TOC plugin were incorrect. A click on a TOC link would scroll down a bit too far.
I "solved" this by :
<section id="foo"><h3>Foo</h3></section>
section { padding-top: 56px; margin-top: -56px; }
config.addPlugin(tocPlugin, { tags: ['section'], wrapper: '', ul: true });
It works from my Nunjucks templates but seems a bit complicated and more importantly I think this will not work in markdown templates.
So, are there better solutions ? Solutions that work with markdown templates ?
For example are there callbacks or APIs that allow me to preprocess or postprocess things myself to fix the links position ?
Beta Was this translation helpful? Give feedback.
All reactions