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

Full docs copy for offline read (PDF, EPUB, HTML) #923

Open
xaur opened this issue Apr 17, 2019 · 6 comments
Open

Full docs copy for offline read (PDF, EPUB, HTML) #923

xaur opened this issue Apr 17, 2019 · 6 comments

Comments

@xaur
Copy link

xaur commented Apr 17, 2019

Suggested here.

As an example see how Python bundles the entire documentation: https://docs.python.org/3/download.html

@s-ben
Copy link
Contributor

s-ben commented Apr 17, 2019

Did a little research on this.

There is actually a MkDocs plugin now that outputs a PDF (which is arguably the most accessible format, if we just choose one),
https://github.com/zhaoterryy/mkdocs-pdf-export-plugin

However, ran into some errors I'm spinning my wheels on. Perhaps @jholdstock has some ideas here? This is the error I'm getting (for all images):

ERROR: Relative URI reference without a base URI: <img src="/img/dcr-icons/DCRsymbol.svg">

I think it might be related this known issue. The workaround is to change a MkDocs config parameter, which I fear could create new issues.

This plugin is based on another project called mkdocs-combine , which combines multiple markdown files into a single markdown file. Which can then be used as input into a tool like pandoc, which can generate any format (PDF, single-page html, epub, etc.). I've tried using pandoc to create the PDF, but am running into yet more errors.

Would keep going here, but wanted to check in to see if anyone had ideas on this before I spent any more time.

@imestin
Copy link
Contributor

imestin commented Sep 22, 2019

What is the situation with this?
Is anybody working on this?

@elmesrar
Copy link

elmesrar commented May 10, 2021

Hello,
please i have the same issue using pdf-export plugin,

i have the following errors : https://pastebin.com/WVpDPvCZ

i dont know what is wrongg in my configuration ?
PS : i cannot install mkdocs-combine.

Best Regards,

@jholdstock
Copy link
Member

Hi @elmesrar - I have moved your log onto pastebin and updated your comment. Please don't paste such long logs into github comments.

Investigating this now.

@jholdstock
Copy link
Member

I've spent some time on this, and fixed all of the "broken" links and references (#1168, decred/dcrdevdocs#98)

I got mkdocs-pdf-export-plugin running, but it has a bunch of issues:

  • Ugly and will need lots of custom css to make pretty
  • Takes >200 seconds to execute
  • Links in the pdf don't work
  • Custom fonts don't work

I have discovered mkdocs-print-site-plugin which seems to be a much more elegant solution - I tested it and it works really well. The only issue is we need to wait for squidfunk/mkdocs-material#2655 to be released first.

@timvink
Copy link

timvink commented May 19, 2021

I saw the reference to this issue on the mkdocs-material issue. I'm the author of mkdocs-print-site-plugin. The main feature of that plugin is being able to combine all markdown pages into a single HTML page. From there, you can create a PDF, but I am also planning on building a workflow to make a standalone HTML that you can share (timvink/mkdocs-print-site-plugin#48).

The epub is a nice idea, but it seems to be more involved. Found f.e. https://github.com/gutenbergtools/ebookmaker. Not on the roadmap but I'm open for PRs if we discuss the design together ;)

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

6 participants