Skip to content

Feature: Plain Markdown generator.#88

Open
BroDudeGuyMan wants to merge 7 commits intolawmurray:mainfrom
BroDudeGuyMan:feature-plain-md-generator
Open

Feature: Plain Markdown generator.#88
BroDudeGuyMan wants to merge 7 commits intolawmurray:mainfrom
BroDudeGuyMan:feature-plain-md-generator

Conversation

@BroDudeGuyMan
Copy link

@BroDudeGuyMan BroDudeGuyMan commented Mar 3, 2026

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 PlainMarkdownGenerator that 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 gitdoc

Init options

There is a new option for the init sub-command:

doxide init --plain

This will create doxide.yaml as normal, as well as the output directory, but will skip creating mkdocs.yaml and 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:

  • Added src/PlainMarkdownGenerator.hpp
  • Added src/PlainMakrdownGenerator.cpp
  • Added bool Driver::plain
  • Edited Driver::init() to Driver::init(bool plain_md)
  • Edited CMakeLists.txt to add set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
  • Added cmbuild.sh to simplify the build process with a dedicated output directory.
  • Added documentation to docs/getting-started.md and docs/running.md

BroDudeGuyMan and others added 4 commits March 3, 2026 00:44
…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.
Copy link
Author

@BroDudeGuyMan BroDudeGuyMan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Owner

@lawmurray lawmurray left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@lawmurray
Copy link
Owner

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.

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.

@BroDudeGuyMan
Copy link
Author

You got it @lawmurray. I can get that done today.

@BroDudeGuyMan
Copy link
Author

@lawmurray I've made the changes. Now, when using init, a style: filed is added to the doxide.yaml file. This is referenced in the generator to make the proper adjustments.

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