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

Deploying extra images with docs #147

Open
hugovk opened this issue Feb 6, 2023 · 2 comments
Open

Deploying extra images with docs #147

hugovk opened this issue Feb 6, 2023 · 2 comments

Comments

@hugovk
Copy link
Member

hugovk commented Feb 6, 2023

Hi @ewdurbin and @JulienPalard!

We recently added sphinxext-opengraph to the CPython docs and devguide, to add metadata to pages to improve SEO:
python/docs-community#63 (comment)

That extension has a new PR open to generate social media cards for each page: wpilibsuite/sphinxext-opengraph#88

Some examples at: https://sphinxext-opengraph--88.org.readthedocs.build/en/88/socialcards.html

I've also built demos at:

The images are good, here's a random example:

For CPython docs it generates some 482 images, 41 MB.

(devguide is 52 images at 4.3 MB)

Do you think that would be a problem for the CPython docs deployments?

@ewdurbin
Copy link
Member

ewdurbin commented Feb 6, 2023

I can't say with certainty, though if this is controllable it really only makes sense to do for "online" builds we'll be serving from docs.python.org, right?

In that case how do we handle translations? Would the social card be generated for each translation of the docs? Does open graph have any consideration for localization?

Depending on how many permutations of the images are created, it could be an issue but even still 41MB per version per translation isn't a huge increase over current sizes. I do think it would be important to ensure they aren't bundled with the archives though.

Just my considerations... I think that exhausts my familiarity :)

@hugovk
Copy link
Member Author

hugovk commented Feb 6, 2023

I can't say with certainty, though if this is controllable it really only makes sense to do for "online" builds we'll be serving from docs.python.org, right?

Yes, only makes sense for online builds. We can control by either not installing the extension, or via config. But will have to double check this.

In that case how do we handle translations? Would the social card be generated for each translation of the docs? Does open graph have any consideration for localization?

Good question, we'll need to test this too. I think it'll be fine because all the text in the screenshot above is taken from the docs. We can disable for translations to begin with.

Depending on how many permutations of the images are created, it could be an issue but even still 41MB per version per translation isn't a huge increase over current sizes. I do think it would be important to ensure they aren't bundled with the archives though.

Yes, we may need to check that the number of images doesn't cause a problem, but we have the ~same number of HTML files.

Just my considerations... I think that exhausts my familiarity :)

Thanks!

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

No branches or pull requests

2 participants