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

Use Sphinx Builder method to get page url #89

Merged
merged 1 commit into from Dec 20, 2022

Conversation

attakei
Copy link
Contributor

@attakei attakei commented Dec 18, 2022

Overview

This PR is to generate og:url correctly for other dirhtml-based builders.

Details

I develop sphinx-revealjs (Sphinx extension to generate presentation) that have dirrevealjs builder extended dirhtml.
I am adding opengraph metatags for dirrevealjs outputs using sphinxext-opengraph, but it does not work for expected.

This has generated /index.html for og:url when use dirrevealjs builder.
But, this should generate / ended.
(For reproduction, please see my reproduction demo.)

For fix(about diff)

Currently, get_tags build page_url manually for dirhtml.
Sphinx builder class has get_target_uri for generate document url from pagename to ref page.
I hope to use this to build og:url.

Copy link
Member

@TheTripleV TheTripleV left a comment

Choose a reason for hiding this comment

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

Thanks!

@TheTripleV TheTripleV changed the title Follow dirhtml inherited builders Use Sphinx Builder method to get page url Dec 20, 2022
@TheTripleV TheTripleV merged commit 5558484 into wpilibsuite:main Dec 20, 2022
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