-
Notifications
You must be signed in to change notification settings - Fork 21
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
feat: Add facility to convert documents with pandoc #10
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also add the bashate test to .github/workflows/tox.yml
Add a facility to, with relative ease, create OpenDocument Text and Word documents from the original Markdown. To use, run tox -e to-odt -- -o output.odt input1.md input2.md input3.md or tox -e to-docx -- -o output.docx input1.md input2.md input3.md To achieve this, a simple script concatenates the input files, processes them against mkdocs.yml using the Jinja2 CLI, and feeds the result to pandoc with appropriate command-line options. For branding, reference.docx and reference.odt files can be placed into the pandoc subdirectory. Also, add bashate testing for the script itself.
There are several issue with admonitions, or rather with the way they are being rendered in the context of Material for MKDocs: * Their font is smaller than the text body font, which is counterproductive for a piece of information that is meant to be emphasised. * They use their own colour scheme, which is hard to align with branding. * They use their own syntax which involves indentation, and thus hijacks what's otherwise meant for preformatted text. * That specific meaning is lost on pandoc, which will render the admonitions as preformatted text in the process of converting to other formats. Thus, remove the admonitions. Convert them to regular paragraphs when appropriate; turn them into blockquotes when they do require additional emphasis.
Yup, done. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to merge those 2 commits inside this PR?
The first one isn't linked to the ability to convert documents with pandoc.
Thanks, the code looks good now. |
Yes it is, as its commit message states:
|
Ha, I guess I misread it, cause I looked at the commit message. LGTM then. |
Ack, can you change your review to "Approved" please? |
Add a facility to, with relative ease, create OpenDocument Text and Word documents from the original Markdown. To use, run
or
To achieve this, a simple script concatenates the input files, processes them against
mkdocs.yml
using the Jinja2 CLI, and feeds the result topandoc
with appropriate command-line options.For branding,
reference.docx
andreference.odt
files can be placed into thepandoc
subdirectory.Also, add
bashate
testing for the script itself.