Feature: Plain Markdown generator.#88
Conversation
…kdownGenerator.hpp and .cpp. Added new subcommand 'gitdoc' to use the PlainMarkdownGenerator. Added Driver::git_build() to utilize PlainMarkdownGenerator functions instead of MarkdownGenerator.
…rks with `gitdoc` command to have the output directory contain only plain Markdown
Corrected the spelling of 'unsupported' in the documentation.
BroDudeGuyMan
left a comment
There was a problem hiding this comment.
The cmbuild.sh script is not a dependency and can be removed from the repo. It's simply a helpful script to clean the build dir, configure CMake, and build the project.
lawmurray
left a comment
There was a problem hiding this comment.
Thanks for working on this @BroDudeGuyMan. I've reviewed the code.
The major issue is that you have copied all of MarkdownGenerator.cpp to PlainMarkdownGenerator.cpp before making your changes in there, which means there is now a lot of duplicated code. That creates a maintenance headache for future: any fixes to that code will need to happen in both files in future. So we can't do that.
Can you instead integrate your changes into MarkdownGenerator.cpp? Similar to what you have done in Driver.cpp, were you just use a few if (plain_md) conditionals to act differently. There are only 10-20 lines that you have had to change in the Markdown generator, so this is the best way.
If you can do that, I can review again.
Let's remove this file too. Everyone has their own workflows, and they can make such a script themselves if that's how they prefer to work. |
|
You got it @lawmurray. I can get that done today. |
|
@lawmurray I've made the changes. Now, when using init, a |
Typo fix
Problem
Doxide currently only outputs Markdown that is not compatible with GitHub webview, and other Markdown viewers. This is okay for larger projects, but small personal repositories often rely on GitHub webview for source documentation.
Fix
New Generator
I have added a new class called
PlainMarkdownGeneratorthat replaces all Mkdoc-specific Markdown with standard, fully supported syntax. Icons have also been replaced with near-identical Unicode characters.Use the new generator with:
doxide gitdocInit options
There is a new option for the
initsub-command:This will create
doxide.yamlas normal, as well as the output directory, but will skip creatingmkdocs.yamland the web content directories. This leaves only Markdown, with no other dependencies.How this helps
Now Doxide can be used as both a documentation hosting tool, and a local documentation manager. All without the hassle of manually editing files and removing directories.
Changes:
src/PlainMarkdownGenerator.hppsrc/PlainMakrdownGenerator.cppbool Driver::plainDriver::init()toDriver::init(bool plain_md)CMakeLists.txtto addset(CMAKE_EXPORT_COMPILE_COMMANDS ON)docs/getting-started.mdanddocs/running.md