Skip to content

Commit 7da6282

Browse files
committed
Pin 'Getting stared with gcloud' section on every page.
Make it togglable, like the node docs. Fixes #553.
1 parent 12ac983 commit 7da6282

File tree

3 files changed

+77
-38
lines changed

3 files changed

+77
-38
lines changed

docs/_components/getting-started.rst

Lines changed: 0 additions & 32 deletions
This file was deleted.

docs/_templates/layout.html

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,71 @@ <h1 class="page-title">Python</h1>
106106
</header>
107107

108108
<section class="content">
109+
<div class="section" id="getting-started">
110+
<h1>
111+
<span id="getting-started-show"></span>
112+
<span id="getting-started-hide" style="display: none"></span>
113+
Getting started with
114+
<tt class="docutils literal"><span class="pre">gcloud</span></tt>
115+
</h1>
116+
<div id="getting-started-body" style="display: none">
117+
<p>The
118+
<tt class="docutils literal"><span class="pre">gcloud</span></tt>
119+
library is
120+
<tt class="docutils literal"><span class="pre">pip</span></tt>
121+
install-able:
122+
</p>
123+
124+
<div class="highlight-console">
125+
<div class="highlight">
126+
<pre>
127+
<span class="gp">$</span> pip install gcloud</pre>
128+
</div>
129+
</div>
130+
131+
<p>If you have trouble installing
132+
<tt class="docutils literal"><span class="pre">pycrypto</span></tt>
133+
or
134+
<tt class="docutils literal"><span class="pre">pyopenssl</span></tt>
135+
(and you&#8217;re on Ubuntu), you can try install the precompiled
136+
packages:
137+
</p>
138+
139+
<div class="highlight-console">
140+
<div class="highlight">
141+
<pre>
142+
<span class="gp">$</span> sudo apt-get install python-crypto python-openssl</pre>
143+
</div>
144+
</div>
145+
146+
<p>If you want to install everything with
147+
<tt class="docutils literal"><span class="pre">pip</span></tt>,
148+
try installing the
149+
<tt class="docutils literal"><span class="pre">dev</span></tt>
150+
packages beforehand:
151+
</p>
152+
153+
<div class="highlight-console">
154+
<div class="highlight">
155+
<pre>
156+
<span class="gp">$</span> sudo apt-get install python-dev libssl-dev</pre>
157+
</div>
158+
</div>
159+
160+
<p>If you want to install <cite>gcloud-python</cite> from source,
161+
you can clone the repository from GitHub:
162+
</p>
163+
164+
<div class="highlight-console">
165+
<div class="highlight">
166+
<pre>
167+
<span class="gp">$</span> git clone git://github.com/GoogleCloudPlatform/gcloud-python.git
168+
<span class="gp">$</span> <span class="nb">cd </span>gcloud-python
169+
<span class="gp">$</span> python setup.py install</pre>
170+
</div>
171+
</div>
172+
</div>
173+
109174
{% block body %} {% endblock %}
110175
</section><!-- end of .content -->
111176
<nav class="side-nav">
@@ -143,6 +208,18 @@ <h1 class="page-title">Python</h1>
143208
<script src="{{ pathto('_static/js/vendor/jquery-1.10.2.min.js', 1) }}"></script>
144209
<script src="{{ pathto('_static/js/plugins.js', 1) }}"></script>
145210
<script src="{{ pathto('_static/js/main.js', 1) }}"></script>
211+
<script>
212+
$("#getting-started-hide").click(function() {
213+
$("#getting-started-hide").hide();
214+
$("#getting-started-show").show();
215+
$("#getting-started-body").hide();
216+
});
217+
$("#getting-started-show").click(function() {
218+
$("#getting-started-hide").show();
219+
$("#getting-started-show").hide();
220+
$("#getting-started-body").show();
221+
});
222+
</script>
146223
{% endblock %}
147224

148225
{# Silence the footer #}

docs/index.rst

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,6 @@
1313
storage-keys
1414
storage-acl
1515

16-
17-
Getting started
18-
---------------
19-
20-
.. include:: _components/getting-started.rst
21-
2216
Cloud Datastore
2317
~~~~~~~~~~~~~~~
2418

0 commit comments

Comments
 (0)