Skip to content

Conversation

franklingu
Copy link
Contributor

currently, there are a few urls with this pattern /docs/...

when trying to covert to pdf for this docsify project, it fails with such errors:

ERROR:
combineMarkdowns

Error: file /docs/micro-services/huifer-what's-microservice-how-to-communicate.md is not exist, but listed in summary.md

by changing "/docs/..." to "./docs/..." the export will work.

What is more, changing of the URLs make URL patterns in summary.md consistent

currently, there are a few urls with this pattern /docs/...

when trying to covert to pdf for this docsify project, it fails with such errors:
~~~
ERROR:
combineMarkdowns

Error: file /docs/micro-services/huifer-what's-microservice-how-to-communicate.md is not exist, but listed in summary.md
~~~

by changing "/docs/..." to "./docs/..." the export will work.

What is more, changing of the URLs make URL patterns in summary.md consistent
@franklingu
Copy link
Contributor Author

this is the npm module to convert to pdf

https://www.npmjs.com/package/docsify-pdf-converter

and here is what I have as the setting

module.exports = {
  contents: [ "summary.md" ], // array of "table of contents" files path
  pathToPublic: "pdf/readme.pdf", // path where pdf will stored
  pdfOptions: "", // reference: https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagepdfoptions
  removeTemp: true, // remove generated .md and .html or not
  emulateMedia: "screen", // mediaType, emulating by puppeteer for rendering pdf, 'print' by default (reference: https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pageemulatemediamediatype)
}

@franklingu
Copy link
Contributor Author

我觉得完全可以加上一下export to pdf的相关指导,起码我这种喜欢pdf的会觉得不错

@yanglbme yanglbme merged commit 5f000b4 into doocs:master Aug 30, 2020
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

Successfully merging this pull request may close these issues.

2 participants