File tree Expand file tree Collapse file tree 6 files changed +54
-18
lines changed
Expand file tree Collapse file tree 6 files changed +54
-18
lines changed Original file line number Diff line number Diff line change @@ -862,6 +862,18 @@ h2 .headerlink:hover {
862862 margin-top : 2em ;
863863}
864864
865+ .side-nav > ul > li .toctree-l1 {
866+ padding-left : 2em ;
867+ }
868+
869+ p .caption {
870+ padding-left : 2em ;
871+ }
872+
873+ span .caption-text {
874+ font-weight : bold;
875+ }
876+
865877.external-links img {
866878 margin-right : 0.3em ;
867879 opacity : 0.3 ;
Original file line number Diff line number Diff line change @@ -13,16 +13,6 @@ $('.headerlink').parent().each(function() {
1313 ) ;
1414} ) ;
1515
16- $ ( '.side-nav' ) . children ( 'ul:nth-child(2)' ) . children ( ) . each ( function ( ) {
17- var itemName = $ ( this ) . text ( ) ;
18- if ( itemName !== 'Datastore' &&
19- itemName !== 'Storage' &&
20- itemName !== 'Pub/Sub' &&
21- itemName !== 'BigQuery' ) {
22- $ ( this ) . css ( 'padding-left' , '2em' ) ;
23- }
24- } ) ;
25-
2616var apiQsSection ;
2717// don't even ask me why
2818if ( $ ( '#cloud-datastore-in-10-seconds' ) . length )
Original file line number Diff line number Diff line change @@ -127,7 +127,6 @@ <h1 class="page-title">Python</h1>
127127 {% block body %} {% endblock %}
128128 </ section > <!-- end of .content -->
129129 < nav class ="side-nav ">
130- < ul > < li > < a href ="{{ pathto('index') }} "> gcloud</ a > </ li > </ ul >
131130 {{ toctree(includehidden=True, maxdepth=1, titles_only=True) }}
132131 < ul class ="external-links ">
133132 < li >
Original file line number Diff line number Diff line change 1111# All configuration values have a default; values that are commented out
1212# serve to show the default.
1313
14+ import os
1415from pkg_resources import get_distribution
15- import sys , os
16+ import sys
1617import urllib
1718
19+ import sphinx_rtd_theme
20+
21+
22+ ON_READ_THE_DOCS = os .environ .get ('READTHEDOCS' , None ) == 'True'
23+ LOCAL_READ_THE_DOCS = os .environ .get ('LOCAL_RTD' , None ) == 'True'
24+
1825# If extensions (or modules to document with autodoc) are in another directory,
1926# add these directories to sys.path here. If the directory is relative to the
2027# documentation root, use os.path.abspath to make it absolute, like shown here.
3643]
3744
3845# Add any paths that contain templates here, relative to this directory.
39- templates_path = ['_templates' ]
46+ if ON_READ_THE_DOCS or LOCAL_READ_THE_DOCS :
47+ templates_path = []
48+ else :
49+ templates_path = ['_templates' ]
4050
4151# The suffix of source filenames.
4252source_suffix = '.rst'
100110
101111html_theme = 'classic'
102112
103- on_rtd = os . environ . get ( 'READTHEDOCS' , None ) == 'True'
104- if on_rtd :
105- html_style = 'default.css'
106- else :
113+ if LOCAL_READ_THE_DOCS :
114+ html_theme = 'sphinx_rtd_theme'
115+ html_theme_path = [ sphinx_rtd_theme . get_html_theme_path ()]
116+ elif not ON_READ_THE_DOCS :
107117 html_style = 'css/main.css'
108118
109119# Theme options are theme-specific and customize the look and feel of a theme
Original file line number Diff line number Diff line change 11.. toctree ::
22 :maxdepth: 0
33 :hidden:
4+ :caption: gcloud
45
56 gcloud-api
7+
8+ .. toctree ::
9+ :maxdepth: 0
10+ :hidden:
11+ :caption: Datastore
12+
613 datastore-overview
714 datastore-client
815 datastore-entities
916 datastore-keys
1017 datastore-queries
1118 datastore-transactions
1219 datastore-batches
20+
21+ .. toctree ::
22+ :maxdepth: 0
23+ :hidden:
24+ :caption: Storage
25+
1326 storage-api
1427 storage-blobs
1528 storage-buckets
1629 storage-acl
30+
31+ .. toctree ::
32+ :maxdepth: 0
33+ :hidden:
34+ :caption: Pub/Sub
35+
1736 pubsub-api
1837 pubsub-usage
1938 pubsub-topic
2039 pubsub-subscription
40+
41+ .. toctree ::
42+ :maxdepth: 0
43+ :hidden:
44+ :caption: BigQuery
45+
2146 bigquery-usage
2247
2348
Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ commands =
4040 sphinx-build -W -b html -d docs/_build/doctrees docs docs/_build/html
4141deps =
4242 Sphinx
43- passenv = {[testenv:system-tests]passenv} SPHINX_RELEASE
43+ passenv = {[testenv:system-tests]passenv} SPHINX_RELEASE READTHEDOCS LOCAL_RTD
4444
4545[pep8]
4646exclude = gcloud/datastore/_datastore_v1_pb2.py,docs/conf.py
You can’t perform that action at this time.
0 commit comments