-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
Option to remove section pages #58
Comments
Definitely. If you inspect the print page, you can see that the section heading has the following HTML: <h1 class="nav-section-title" id="section-extra">
Extra <a class="headerlink" href="#section-extra" title="Permanent link">↵</a>
</h1> I could include some extra CSS. For example try: .nav-section-title {
display: hidden !important;
} But probably you just want to avoid that sections have their own page because it takes so much space. That's controlled by some CSS from this plugin: mkdocs-print-site-plugin/mkdocs_print_site_plugin/css/print-site.css Lines 336 to 347 in ad73023
You could try overriding it by adding: #print-site-page .nav-section-title {
page-break-before: avoid !important;
page-break-after: avoid !important;
} |
Mhm... that doesn't seem to be working right... I guess I should remove all breaks and eventually add them explicitly on sections I do want them. What is the easy way to remove them all, so that it looks like HTML one: |
Looks there are some other CSS classes you need to overwrite, I think #print-site-page .nav-section-title {
page-break-before: avoid !important;
page-break-after: avoid !important;
vertical-align: baseline !important;
padding-top: 1em !important;
} |
Nah :) You can see for yourself:
|
God damn, I experimented a lot with F12 tools in chrome, messing around with all CSS on that element, and I found some constellations would produce desired result, but I can't pinpoint exactly what CSS combination needs to be set for this.... freaking css... |
Yeah this is too clunky. I will add an option to not include the CSS stylesheets. You can then add them yourself and modify them directly. |
Released in v2.2 |
Works great. Thanks m8 :) |
This quickly pile up on larger projects - I can have from 10-30 empty pages with this like it is now.
Here is an example:
Can we have an option to remove them ?
The text was updated successfully, but these errors were encountered: