Skip to content

Using caption with different toc sections instead of JS/CSS hack. - #1025

Merged
dhermes merged 1 commit into
googleapis:masterfrom
dhermes:use-sphinx-captions
Aug 5, 2015
Merged

Using caption with different toc sections instead of JS/CSS hack.#1025
dhermes merged 1 commit into
googleapis:masterfrom
dhermes:use-sphinx-captions

Conversation

@dhermes

Copy link
Copy Markdown
Contributor

Using caption with different toc sections instead of JS/CSS hack.

This fits within the Sphinx construct and would allow our docs to be built on readthedocs.org.


Building with tox -e docs we get:

screen_shot_014


Building with LOCAL_RTD=True tox -e docs we get:

screen_shot_015

AFAICT, by using :titlesonly: and some other rules we can get rid of the expandable sections (or just not use h1, or change maxdepth).

@dhermesdhermes added docs do not merge Indicates a pull request not ready for merge, due to either quality or timing. labels Jul 30, 2015
@googlebotgooglebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 30, 2015
@dhermes

Copy link
Copy Markdown
ContributorAuthor

Note the dont-merge label. I just wanted to discuss the issues with either approach.

@dhermes

Copy link
Copy Markdown
ContributorAuthor

Previous comments that were addressed in later changes:


This fits within the Sphinx construct and would allow our docs to be built on readthedocs.org.

Unfortunately, this doesn't quite agree with our CSS (we need some left-hand padding):
screen_shot_011

I got this inspiration / technique from (source):
https://docs.readthedocs.org/en/latest/


As a test to see if our docs would build in the readthedocs theme, I swapped out html_theme for 'sphinx_rtd_theme' and turned off our custom html_style. The resulting output is a mess (I think our custom template is to blame):

screen_shot_012

@dhermes
dhermesforce-pushed the use-sphinx-captions branch from c062561 to 65e7b2cCompareJuly 31, 2015 20:01
@dhermesdhermes removed the do not merge Indicates a pull request not ready for merge, due to either quality or timing. label Jul 31, 2015
@dhermes
dhermesforce-pushed the use-sphinx-captions branch from 65e7b2c to 0a4fde6CompareAugust 4, 2015 16:38
@dhermes

Copy link
Copy Markdown
ContributorAuthor

@tseaver I fixed the failure (was really just #1029 showing) and rebased against master. The merging of #1026 makes this "ready to go" for activating RTD.

@dhermes

Copy link
Copy Markdown
ContributorAuthor

I jumped the gun on getting it up on RTD, looks pretty silly 😄
screen_shot_002

@tseaver and @jgeewax, what are your readthedocs.org usernames so I can add you as admins of the project?

@tseaver

Copy link
Copy Markdown
Contributor

Mine is tseaver.

This fits within the Sphinx construct and would allow our docs to
be built on readthedocs.org.
@dhermes
dhermesforce-pushed the use-sphinx-captions branch from 0a4fde6 to 865a78aCompareAugust 4, 2015 17:56
@dhermes

Copy link
Copy Markdown
ContributorAuthor

@tseaver Added you as a maintainer. Are you reviewing this?

@dhermes

Copy link
Copy Markdown
ContributorAuthor

@tseaver Any issues with these changes?

@tseaver

Copy link
Copy Markdown
Contributor

Sorry, I thought from the botched rendering in the last example it wasn't ready to go. LGTM.

dhermes added a commit that referenced this pull request Aug 5, 2015
Using caption with different toc sections instead of JS/CSS hack.
@dhermes
dhermes merged commit 789508a into googleapis:masterAug 5, 2015
@dhermes
dhermes deleted the use-sphinx-captions branch August 5, 2015 02:05
@dhermes

Copy link
Copy Markdown
ContributorAuthor

@tseaver Do you know much about RTD?

It's using the old Sphinx theme for some reason (though not locally via LOCAL_RTD=True tox -e docs):
http://gcloud-python.readthedocs.org/en/latest/

screen_shot_017

@dhermes

Copy link
Copy Markdown
ContributorAuthor

I think it might be my use of

ifON_READ_THE_DOCSorLOCAL_READ_THE_DOCS:
templates_path= []
else:
templates_path= ['_templates']

i.e. I think RTD uses _templates.

@dhermes

Copy link
Copy Markdown
ContributorAuthor

Scratch that, it was the use of html_theme = 'classic', which gets picked up by us here on RTD.

@dhermesdhermes mentioned this pull request Aug 12, 2015
parthea pushed a commit that referenced this pull request Nov 22, 2025
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea pushed a commit that referenced this pull request Nov 24, 2025
* fix: use correct typing for retries
Closes#1024
* fix: import 'ClientOptions' class correctly
Closes#1025
* fix: remove typing from base transport 'operations_client', repair typing for `_operations_client` attr
Closes#1028.
parthea pushed a commit that referenced this pull request Mar 2, 2026
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
parthea added a commit that referenced this pull request Mar 2, 2026
* chore(python): Add Python 3.12
Source-Link: googleapis/synthtool@af16e6d
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-python:latest@sha256:bacc3af03bff793a03add584537b36b5644342931ad989e3ba1171d3bd5399f5
* Add python 3.12 to setup.py and owlbot.py
* 🦉 Updates from OwlBot post-processor
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
* fix incorrect usage of assert_called_once()
* update required checks
---------
Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
parthea pushed a commit that referenced this pull request Mar 9, 2026
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yesThis human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@dhermes@tseaver@googlebot