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

How to deal with multi-level documents? — Image links #17

Closed
rei-vilo opened this issue Oct 4, 2020 · 3 comments
Closed

How to deal with multi-level documents? — Image links #17

rei-vilo opened this issue Oct 4, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@rei-vilo
Copy link

rei-vilo commented Oct 4, 2020

I'm trying to use mkdocs-print-site-plugin on a multi-level document.

The structure is:

Capture 2020-10-04 à 11 51 23

The Chapter 1 - Section 1 page contains

# Chapter 1 - Section 1

## Part 1

This is a test.The installation of embedXcode includes 3 basic steps and an optional one:

+ Step 1 :fontawesome-solid-link:

+ Step 2 :fontawesome-solid-external-link-alt:

![](img/Picture1-1.png)

The Chapter 1 - Section 1 page renders as

Capture 2020-10-04 à 11 58 45

but with Print site,

  • First level headers are omitted from the TOC, here Chapter 1

Capture 2020-10-04 à 11 57 25

  • Picture1-1.png is not found.

Capture 2020-10-04 à 11 51 54

How to deal with multi-level documents? Thank you for your help!

@timvink
Copy link
Owner

timvink commented Oct 4, 2020

Hi @rei-vilo ,

Thanks for taking the time to report these issues. Finding these kind of edge cases really helps to mature the package.

There are indeed two separate issues here:

  1. images links in the print page were not updated.
  2. The sections in the navigation are not displayed in the print page table of contents.

I just released v0.7.1 that fixed 1), and I'll work on adding support for 2) probably later this week.

@rei-vilo rei-vilo changed the title How to deal with multi-level documents? How to deal with multi-level documents? — Image links Oct 4, 2020
@rei-vilo
Copy link
Author

rei-vilo commented Oct 4, 2020

That was fast! Thank you for your prompt answer.

I agree with you there are two different issues under one single question about multi-level documents. If you don't mind, I specialising this thread to the image links and creating another thread for the top sections.

I am also adding the minimal test I am using to evaluate Print Site.

Now, based on the above project, Picture1-1.png still doesn't show up.

Capture 2020-10-04 à 16 09 41

I had a blok at the html code generated by MkDocs:

<p><img alt="" src="Chapter1/img/Picture1-1.png" /></p></section><section class="print-page" id="chapter1-section2"><h1 id="chapter1-section2-chapter-1-section-2">Chapter 1 - Section 2<a class="headerlink"  href="#chapter1-section2-chapter-1-section-2" title="Permanent link">&para;</a></h1>

Given the structure of the website generated by MkDocs,

Capture 2020-10-04 à 16 09 06

the exact path should be ../Chapter1/img/Picture1-1.png

<p><img alt="" src="../Chapter1/img/Picture1-1.png" /></p></section><section class="print-page" id="chapter1-section2"><h1 id="chapter1-section2-chapter-1-section-2">Chapter 1 - Section 2<a class="headerlink"  href="#chapter1-section2-chapter-1-section-2" title="Permanent link">&para;</a></h1>

@timvink
Copy link
Owner

timvink commented Oct 7, 2020

This should be fixed now, just released v0.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants