<div dir="ltr"><div>Hi all,</div><div><br></div><div>in Rally gates, we have a job that automatically builds the Sphinx documentation for ReadTheDocs so that we can surf through it while reviewing new patches. It produces, however, HTML files in a format which is different from the default one (used on ReadTheDocs).</div><div><br></div><div>We've <a href="http://read-the-docs.readthedocs.org/en/latest/theme.html">found</a> the following snippet that enables the default ReadTheDocs theme locally (and so in gates):</div><div><br></div><div><pre style="font-family:Consolas,'Andale Mono WT','Andale Mono','Lucida Console','Lucida Sans Typewriter','DejaVu Sans Mono','Bitstream Vera Sans Mono','Liberation Mono','Nimbus Mono L',Monaco,'Courier New',Courier,monospace;font-size:12px;margin-top:0px;margin-bottom:0px;padding:12px;line-height:1.5;overflow:auto;color:rgb(64,64,64)"><span class="" style="color:rgb(153,153,136);font-style:italic"># on_rtd is whether we are on <a href="http://readthedocs.org">readthedocs.org</a></span>
<span class="">import</span> <span class="" style="color:rgb(85,85,85)">os</span>
<span class="" style="color:rgb(51,51,51)">on_rtd</span> <span class="" style="font-weight:bold">=</span> <span class="" style="color:rgb(51,51,51)">os</span><span class="" style="font-weight:bold">.</span><span class="" style="color:rgb(51,51,51)">environ</span><span class="" style="font-weight:bold">.</span><span class="" style="color:rgb(51,51,51)">get</span><span class="">(</span><span class="" style="color:rgb(221,17,68)">'READTHEDOCS'</span><span class="">,</span> <span class="" style="color:rgb(153,153,153)">None</span><span class="">)</span> <span class="" style="font-weight:bold">==</span> <span class="" style="color:rgb(221,17,68)">'True'</span>

<span class="" style="font-weight:bold">if</span> <span class="" style="font-weight:bold">not</span> <span class="" style="color:rgb(51,51,51)">on_rtd</span><span class="">:</span>  <span class="" style="color:rgb(153,153,136);font-style:italic"># only import and set the theme if we're building docs locally</span>
    <span class="">import</span> <span class="" style="color:rgb(85,85,85)">sphinx_rtd_theme</span>
    <span class="" style="color:rgb(51,51,51)">html_theme</span> <span class="" style="font-weight:bold">=</span> <span class="" style="color:rgb(221,17,68)">'sphinx_rtd_theme'</span>
    <span class="" style="color:rgb(51,51,51)">html_theme_path</span> <span class="" style="font-weight:bold">=</span> <span class="">[</span><span class="" style="color:rgb(51,51,51)">sphinx_rtd_theme</span><span class="" style="font-weight:bold">.</span><span class="" style="color:rgb(51,51,51)">get_html_theme_path</span><span class="">()]</span>

<span class="" style="color:rgb(153,153,136);font-style:italic"># otherwise, <a href="http://readthedocs.org">readthedocs.org</a> uses their theme by default, so no need to specify it</span></pre></div><div><br></div><div>The problem is that it uses the <a href="https://pypi.python.org/pypi/sphinx_rtd_theme">sphinx_rtd_theme</a> package, which is not included in the global requirements. What should we do then do have that default ReadTheDocs theme in our gates?</div><div><br></div><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><font color="#666666">Best regards,</font><div><font color="#666666">Mikhail Dubov</font></div><div><font color="#666666"><br></font></div><div><span style="color:rgb(102,102,102);font-family:arial;font-size:small">Engineering OPS</span><br></div><div><font color="#666666">Mirantis, Inc.</font></div><div><font color="#666666">E-Mail: <a href="mailto:mdubov@mirantis.com" target="_blank">mdubov@mirantis.com</a></font></div><div><font color="#666666">Skype: msdubov</font></div></div></div></div></div></div>
</div>