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

Possibility to include the content of a specific markdown section? #628

Closed
mara004 opened this issue Oct 8, 2022 · 4 comments
Closed

Possibility to include the content of a specific markdown section? #628

mara004 opened this issue Oct 8, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@mara004
Copy link

mara004 commented Oct 8, 2022

Context

I'd like to include a specific section of a Readme file in my sphinx documentation. With {include} ../../README.md I can include the whole file, but is it also possible to include a just the content of a specific section, without the heading?

In the Readme, the first heading is the project name, while in the Sphinx documentation I would like it to be "Readme".

This is somewhat related to #516, with the difference that I'd like to rename the first heading instead of putting another heading above.

Proposal

Something like :section: section_name (below the {include} line) to include only the content of the given section.

Tasks and updates

No response

@mara004 mara004 added the enhancement New feature or request label Oct 8, 2022
@welcome
Copy link

welcome bot commented Oct 8, 2022

Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out EBP's Code of Conduct. Also, please try to follow the issue template as it helps other community members to contribute more effectively.

If your issue is a feature request, others may react to it, to raise its prominence (see Feature Voting).

Welcome to the EBP community! 🎉

@mara004
Copy link
Author

mara004 commented Oct 8, 2022

Ah, after some browsing I found the relevant code passage

class MockIncludeDirective:

There I realised this is already implemented with the :start-after: option.
However, I can't find this being documented anywhere. It would be really helpful if there were some page specifying the directive's options.

@mara004 mara004 closed this as completed Oct 8, 2022
mara004 added a commit to pypdfium2-team/pypdfium2 that referenced this issue Oct 8, 2022
@chrisjsewell
Copy link
Member

@mara004
Copy link
Author

mara004 commented Oct 8, 2022

Thanks, I can take a look, though usually it's best if the people who write the code also write the API documentation, to avoid mistakes or missing details. However, I also understand that developers may be busy enough with the code itself, and writing documentation can sometimes be a bit of a liability.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants