Skip to content
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

Emitting Markdown: what are the options? #34

Open
snunez1 opened this issue Aug 21, 2023 · 0 comments
Open

Emitting Markdown: what are the options? #34

snunez1 opened this issue Aug 21, 2023 · 0 comments

Comments

@snunez1
Copy link

snunez1 commented Aug 21, 2023

I've spent the last few days looking for a documentation system to pull docstrings, convert them and emit markdown. I need a relatively rich input format and RST or Scriba look like they'll do the trick. I've got some legacy Scriba to work with too, and don't fancy converting it. Generally I like the concept of CommonDoc and I think good documentation needs to be a combination of hand-crafted and generated.

With this issue I'd like to explore what the best way to add a markdown package to emit docs/sections as markdown. In theory this should be simpler than the current HTML, since there's no formatting directives or style that need to be handled. The use case is to emit MD to be further processed by a documentation system generator, in this case Hugo. There are many styles ('themes') available, and this way I don't have to concern myself with styling and deployment.

How would one of you experienced with CommonDoc approach this? Initially I thought of:

  1. Cloning the HTML emitter code paths however, to my eye, they're a bit convoluted and involve many systems and dependencies.
  2. Walk the doc tree and use a generic template system like cl-template or html-template to emit the markdown. Despite the name, html-template is actually agnostic to the output format.
  3. Maybe just walk the tree and manually emit?

I think any of these would work; the sticking point at the moment is the conversion of the docstring text from scriba to markdown, which I think happens in a combination of common-html and pandocl.

Any ideas?

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

No branches or pull requests

1 participant