Skip to content

How to switch from Markdown Extra to other Markdown flavors? #269

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

Open
f0ff886f opened this issue Oct 12, 2020 · 5 comments
Open

How to switch from Markdown Extra to other Markdown flavors? #269

f0ff886f opened this issue Oct 12, 2020 · 5 comments
Labels
bug Something isn't working enhancement New feature or request help wanted 🤷 Extra attention is needed question Not a bug, but a FAQ entry

Comments

@f0ff886f
Copy link

Expected Behavior

I'd like my module docs to be rendered correctly in something like a GitHub README.md file. Problems are caused with Markdown Extra, I'd like to switch to something simpler.

Actual Behavior

The use of Markdown Extra (and specifically things like definition lists) cause Class methods (or all Class documentation, really) to render as one giant codeblock.

Steps to Reproduce

  1. pdoc foo.py where foo.py is https://gist.github.com/f0ff886f/99f504e700d2fc0ec9e3a8012d2fa3f9
  2. Output is: https://gist.github.com/f0ff886f/dab4023f59eb54ad7e97b7b983d981e1

Additional info

  • pdoc version: 0.9.1
@kernc
Copy link
Member

kernc commented Oct 12, 2020

pdoc foo uses somewhat undocumented text.mako template, which you can edit/override per your preference.

This is primarily a documentation bug.

@kernc kernc added the bug Something isn't working label Oct 12, 2020
@f0ff886f
Copy link
Author

Ah I see, so we can just create a whole new template to fit whatever style of Markdown we wish. Cool, I will try to make something visually appealing and share it back.

@kernc kernc added question Not a bug, but a FAQ entry and removed bug Something isn't working labels Oct 12, 2020
@dleske
Copy link

dleske commented Aug 12, 2021

@f0ff886f Glad you created this issue--it enabled me to find half an answer to my problem (generating API documentation automatically for my git repo).

Now for the other half ;) -- did you ever create such a template?

Cool, I will try to make something visually appealing and share it back.

@dleske
Copy link

dleske commented Aug 13, 2021

I've been munging the text template for my own uses but can't get past the fact that the markdown-generating code produces non-markdown output:

Returns
-----=
Integer job identifier.

Raises
-----=
...

This isn't interpreted by MD renderers I'm aware of. Looking at the code in html_helpers.py (whose functions appear to be used by non-HTML rendering) there's a comment about this being done to avoid re-interpretation by numpy docstring parsing, but I haven't yet figured out a way around this in my use of to_markdown() from my template.

Suggestions welcome, not sure where I'm going wrong.

@kernc kernc added bug Something isn't working enhancement New feature or request help wanted 🤷 Extra attention is needed labels Aug 16, 2021
@dleske
Copy link

dleske commented Aug 19, 2021

Created a text template for my use and possibly others can make use of it too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request help wanted 🤷 Extra attention is needed question Not a bug, but a FAQ entry
Development

No branches or pull requests

3 participants