jean-humann / docs-to-pdf

Generate PDF for document website 🧑‍🔧
https://www.npmjs.com/package/docs-to-pdf
MIT License
109 stars 19 forks source link

Templates for arguments #197

Closed tats-u closed 1 year ago

tats-u commented 1 year ago
--contentSelector="article" --paginationSelector="a.pagination-nav__link.pagination-nav__link--next" --excludeSelectors=".margin-vert--xl a,[class^='tocCollapsible'],.breadcrumbs,.theme-edit-this-page"

This software always requires a so-long options. It is so long that no one can input without reading the README. It would be nice if we can shorten this to like:

--template docusaurus2
jean-humann commented 1 year ago

Hi @tats-u , Thanks for the participation 👍 I agree with you on this point. I was wondering about a subcommand such as docs-to-pdf docusaurus encapsulating all the default flag link to docusaurus. Coud link to a --from-build flag as well. Will do the same for other documentation framework later. What do you think about it ?

tats-u commented 1 year ago

Did you mean:

It's acceptable. Could you tell me the details of --from-build?

jean-humann commented 1 year ago

@tats-u exactly --from-build would allow you to build PDF directly from the the build directory generated by docusaurus build without having to do docusaurus serve

tats-u commented 1 year ago

@jean-humann It looks great. --version or similar flag will be necessary to designate the version of Docusaurus.

jean-humann commented 1 year ago

@tats-u Done in #212 with --version flag