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 an initial doclist extension. #10552

Closed
wants to merge 1 commit into from
Closed

Add an initial doclist extension. #10552

wants to merge 1 commit into from

Conversation

ericholscher
Copy link
Member

@ericholscher ericholscher commented Jul 20, 2023

This creates a definition list of the document,
and the first 2 paragraphs of the doc to make a nice index.

This is just a first attempt at this,
but something we've wanted to not keep repeating the same content over and over again.

Screenshot

Testing
-------

.. doclist:: intro/getting-started-with-sphinx
Screenshot 2023-07-20 at 3 27 28 PM

Ideas for improvement

We likely want to have some kind of metadata in the file or similar that's a description that's used first, and then fallback to the top sentence or two, since we don't always want the first 2 sentences to be a good fit for the listing description.

Fixes #10157

This creates a definition list of the document,
and the first 2 paragraphs of the doc to make a nice index.

This is just a first attempt at this,
but something we've wanted to not keep repeating the same content over and over again.
@ericholscher ericholscher requested a review from a team as a code owner July 20, 2023 22:29
@ericholscher ericholscher marked this pull request as draft July 20, 2023 22:30
@agjohnson
Copy link
Contributor

Looking good so far!

We likely want to have some kind of metadata in the file or similar that's a description that's used first, and then fallback to the top sentence or two, since we don't always want the first 2 sentences to be a good fit for the listing description.

👍 This seems like a really good starting target even. I found most pages have some boilerplate sort of sentences that aren't great descriptions, so I imagine we'll hit this scenario pretty quickly.

I bet we can pretty easily reuse filewide/doc metadata attributes and pull a descriptive title out from docinfo. I like the option of falling back to the first two sentences, at least it's something we can rely on.

@ericholscher
Copy link
Member Author

I think we've refactored this enough to not need this code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Docs: Research solution for reusable page meta data
2 participants