twardoch / mkdocs-combine

Convert an MkDocs Markdown source site to a single Markdown document
https://twardoch.github.io/mkdocs-combine/
Apache License 2.0
38 stars 17 forks source link

Architecture Comment Filters #12

Open kellpossible opened 6 years ago

kellpossible commented 6 years ago

Hey, just thinking, perhaps it would be better if instead of converting everything to a single markdown document and then applying filters, it converted it all directly to a single page html document, and apply the filters to that. The reason for this thinking is that filters can be more reliably applied to HTML documents because they are easier to edit, as opposed to a bunch of flimsy regexes

kellpossible commented 6 years ago

and pandoc still has the ability to convert html documents to latex for pdf purposes as far as I'm aware, also it opens up the door more for using this with other html to pdf converters.

kellpossible commented 6 years ago

I have another private project which uses html as an intermediate representation to convert from microsoft word documents to markdown/reStructuredText in order to apply edits before converting again with pandoc. This approach appears to work pretty well.

kellpossible commented 6 years ago

While building support for cross-referencing I ran into this limitation https://github.com/kellpossible/mkdocs-combine/issues/3

twardoch commented 6 years ago

Note this project:

https://github.com/shauser/mkdocs-pdf-export-plugin

it may be better architecturally since it's a new-style MkDocs plugin so MkDocs does all the heavylifting. I'll probably retire this project and replace it with a fork of that other one.