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

Add option to Render the heading#1 for letting readthedocs to generate TOC automatically #214 #216

Closed
wants to merge 3 commits into from

Conversation

t6847kimo
Copy link
Contributor

Hi, sorry for late response.
Please take a look at it, thanks!

Copy link
Owner

@NiklasRosenstein NiklasRosenstein left a comment

Choose a reason for hiding this comment

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

Hey @t6847kimo , thanks for the PR. I have to think about this a bit more. The Renderer.render() method does not accept a page_title argument and I'm unsure if I want to add it to the interface.

src/pydoc_markdown/contrib/renderers/markdown.py Outdated Show resolved Hide resolved
src/pydoc_markdown/contrib/renderers/markdown.py Outdated Show resolved Hide resolved
@NiklasRosenstein
Copy link
Owner

I just noticed that I even suggested this 🥲

There's many was this could be done. I think I would prefer an option in the Mkdocs renderer like render_page_title and that option is either passed to Page.render() or is set as an option in the Markdown renderer along with the title string.

t6847kimo and others added 2 commits October 4, 2021 00:19
Co-authored-by: Niklas Rosenstein <rosensteinniklas@gmail.com>
Co-authored-by: Niklas Rosenstein <rosensteinniklas@gmail.com>
@t6847kimo
Copy link
Contributor Author

Hi, may I know the current status?
Can I help anything?

NiklasRosenstein added a commit that referenced this pull request Dec 12, 2021
NiklasRosenstein added a commit that referenced this pull request Dec 12, 2021
* Add render_page_title option for markdown

* Update src/pydoc_markdown/contrib/renderers/markdown.py

Co-authored-by: Niklas Rosenstein <rosensteinniklas@gmail.com>

* Update src/pydoc_markdown/contrib/renderers/markdown.py

Co-authored-by: Niklas Rosenstein <rosensteinniklas@gmail.com>

* add new SinglePageRenderer interface which is implemented by MarkdownRenderer to allow passing a page title from the Page class

* enable `render_page_title` for Pydoc-Markdown config

* update prerender step

* feature: Add `render_page_title` option. (@t6847kimo)

fixes #214, #216

Co-authored-by: Yancy Chien <t6847kimo@gmail.com>
@NiklasRosenstein
Copy link
Owner

Hey @t6847kimo , sorry for the long silence. I've made a few changes before merging, that's why I create a new PR for it. Thanks for the contribution!

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.

None yet

2 participants