Commit Graph

39 Commits

Author SHA1 Message Date
Stephen Finucane 6676aa9256 Retire oslosphinx
Change-Id: I8c132b41ac325b3ad9c420df583d19b08c18f690
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
Closes-Bug: #1713543
Depends-On: https://review.openstack.org/#/c/649954/
2019-04-04 09:53:27 +00:00
zhangshj 1df6fcbc1e Replacing the HTTP protocal with HTTPS in layout.html
Change-Id: I2f5a23121195813e3c5a9aa4e1a1fd636fbfc620
2018-12-16 13:14:33 +08:00
Dirk Mueller 07d37b4ef3 Fix outdated quantumclient reference
the rename to neutronclient has been some time ago already. Also
the link was pointing to swift instead, which seems like an obvious
copy&paste mistake.

Change-Id: I2596e7500dedd01caa624377633754bf4a56fb48
2017-06-02 12:56:53 +02:00
Thomas Bechtold 9380c0cab9 Fix intersphinx mapping for neutron
quantum is long gone. Replace it with neutron.

Change-Id: I2e22798fc66712ffe8a87b61ca9083d9a3c6e35c
2017-05-29 19:03:25 +02:00
Javier Pena ef759e96d1 Fix doc build from tarball using eventlet>0.19.0
When subprocess is monkey-patched using eventlet, trying to catch
subprocess.CalledProcessError exception won't work [1]. This breaks
doc build from a tarball, so let's catch all exceptions.

[1] https://github.com/eventlet/eventlet/issues/357

Change-Id: Ibcf535c6e4994a67fc3ec71631a81ecb91dd2845
Closes-Bug: #1693148
2017-05-24 11:32:53 +02:00
Beth Elwell b29dc2937e Amended dev documentation side navigation
Amended developer documentation side navigation to add an option for
clearly returning to the project developer documentation home page.
Previously it was possible to return to the home page by clicking
'table of contents' however this is not obvious and makes it hard
to get around the complete project documentation once you have left
the homepage.

This patch removes the link from 'table of contents' which is
misleading, and a link is added beneath this header to say 'Return
to project home page'.

Change-Id: I7cf96acead62f00224ca9217a80760b4a65d42d6
Closes-bug: #1666323
2017-02-22 09:47:38 -05:00
Akihiro Motoki c6b55af713 Support more notice blocks like important, tip and caution
Sphinx supports various notice blocks but the oslosphinx theme
does support only warning and note. openstackdoctheme used by
openstack-manuals project supports 'important', 'tip' and 'caution'
blocks. It would be nice if oslosphinx support these notices.
It reduces confusions on contributors to both types of projects.

Change-Id: I3e1db551b05fa681520763c24e2576f9ad5379d8
2016-09-15 20:32:27 +09:00
Ondřej Nový 5c765d5561 Fixed AttributeError: 'str' object has no attribute 'decode'
When git cmd fails, raw_version_list is set to empty 'str' and then
we are trying to decode it. This patch moves decoding inside try/catch
block, so we are decoding return value of subprocess call, which is bytes
in Python 3.

Change-Id: Ibd2f556355a6413beb21473ebfca3b836cbc1d73
2016-07-17 17:32:12 +02:00
David Stanek 3bcdfc6b77 Allow "Other Versions" section to be configurable
Adds a new option that allows the "Other Versions" section to be removed
if a project isn't interested in showing links to older versions. The
default value is False which means that it will be hidden.

Even though the setting is not backward compatible there are enough
broken documentation links in the OpenStack projects that this should be
opt-in behavior.

Change-Id: Ic4b47b19aa9db38557c37aed7722174b7dbdf4a1
Closes-Bug: #1599260
2016-07-12 16:18:39 +00:00
John Dickinson 3fc15a50f6 fix other versions sidebar links
Make the first one link to the current docs and the others
link with the appropriate prefix.

Filtered out previous versions that include "rc".

The number of versions is kept at 5 (current + 4 recent).

Closes-Bug: #1589731
Change-Id: I3a2e219913fc2c89634bcc2a757ccb4d3510883a
2016-06-20 23:07:17 +01:00
Joshua Harlow d901a7bd61 Subprocess returns bytes in py3
When later used the current code will break in
python3 due to:

TypeError: 'str' does not support the buffer
           interface

Change-Id: I11572dd510ce8255ed66de56d5d9000755f7fee2
2016-06-01 16:46:04 -07:00
John Dickinson 75cfb9f93b add recent versions links to sidebar
The last five tags (that start with a number) are used as version
numbers and linked to. This updates the sphinx extension so that
every user of the theme gets this info automatically with no need
to update the conf.py on a per-project basis.

Change-Id: I9bf17872bd23bed3cab9b5e2349d615c7001cb66
2016-05-09 14:35:20 -07:00
Brant Knudson 7de9722551 Correct project source guessing for OpenStack
The links to the project source in all the developer docs are
incorrect. The link for keystone is like

 http://git.openstack.org/cgit/p/openstack/keystone

when it should be

 http://git.openstack.org/cgit/openstack/keystone

See the link to "Project Source" on the left on
http://docs.openstack.org/developer/keystone/ for example.

Also, developers sometimes use a ".git" URL when they clone so
strip off the .git.

Change-Id: I8e7620119a169e3322d602ea633303cf9f941605
2016-02-02 08:56:12 -06:00
briancurtin 2fbfcf568f Use proper decode function name.
os.fdecode is not a real thing, os.fsdecode is.

Change-Id: I20b3b6d15b7d5775e1f6f97190d9acc62ca3a4ca
2015-12-08 15:27:52 -06:00
Doug Hellmann f8d71ac5ad trap errors from git not being present
subprocess raises OSError if the command it is asked to run isn't found,
so trap that as well as the subprocess-specific error we were already
catching.

Change-Id: Ieb9c7f3ccc307250847104a7f97cfa28603fcf5d
Closes-Bug: #1521541
2015-12-01 16:34:54 +00:00
Cyril Roelandt 10d5529934 Fix a string vs bytes issue in _guess_cgit_link
subprocess.check_output returns bytes, so we end up using '+' on a text
string (CGIT_BASE) and bytes (the output of parsed.path) in
_guess_cgit_link. Make sure we decode 'git_remote' in Python 3.

Change-Id: I9e846e2192ead41ca2328b8aa20994742096c51e
Closes-Bug: #1517525
2015-11-23 15:06:06 +01:00
Doug Hellmann 0b555a001f fix html context event handler
The event handler should return a replacement template *name* or None.
Since we don't want to change the template, return None.

Change-Id: I3012ad22505230c488aa4babbd4141d903b7ab0d
Closes-Bug: 1516834
2015-11-17 01:06:00 +00:00
Doug Hellmann c383e0026a add config option to point to the cgit browser
Add a configuration option to let projects set the URL to the cgit
browser for their source. Still try to guess at the location based on
our git URL.

Change-Id: I11455f8a137a029c28a864eb555f69f6c282840b
2015-10-16 20:40:02 +00:00
Doug Hellmann cd2674bb95 fix html-page-context event handler
The event handler should return a string if it wants to replace the
template, but should otherwise return None and update the context in
place.

Change-Id: Ic4b19c7d19eda866ba139913cf817c99a65c8c08
Closes-Bug: #1505311
2015-10-12 19:50:40 +00:00
Javier Pena 2525bb98d1 Make urlparse import Python3-compatible
urlparse moved to urllib.parse, so the current code fails in
Python3. Using six to ensure compatibility.

Related-Bug: #1426898

Change-Id: I9297c886dcc361238e942cb8162f589072001094
2015-09-28 11:34:24 +02:00
Jenkins b0f3ed9cca Merge "Titles in table of contents continue into the page" 2015-09-25 21:00:11 +00:00
Javier Pena 36dd92b1e1 Fix subprocess exception name
https://review.openstack.org/227299 added code using
subprocess.CheckedProcessException, which does not exist. From
the Python documentation, it should be
subprocess.CalledProcessError [1]

[1] - https://docs.python.org/2/library/subprocess.html#subprocess.CalledProcessError

Change-Id: I0e03f048a33b1b919e38d22038650a633b8ac5fd
2015-09-25 16:25:14 +02:00
THOMAS J. COCOZZELLO ff59f302c4 Titles in table of contents continue into the page
In the table of contents the titles are covering words
in the page, this won't be a problem but the directories
that are in the table of contents are considered 1 word
so it does not word wrap automatically

Change-Id: I763aa1ba4418be1ea70d1ff48a321971630ec6e4
Closes-Bug: 1498654
2015-09-25 09:09:28 -05:00
Doug Hellmann efec9c68fe add link to project source in navigation sidebar
Change-Id: I841f0e63259d6b79c55b223c8e7266c8520a668d
Closes-Bug: #1426898
2015-09-24 13:21:42 +00:00
Jenkins af39c45cca Merge "Drop incubating theme option" 2015-05-27 21:05:05 +00:00
Joe Gordon 46832a8942 Drop incubating theme option
OpenStack has dropped the incubation concept, so drop this label as a
docs option.

Change-Id: Ib95bb403d51ed3c7b682dd695713f43432cf8a4e
2015-05-27 12:19:34 -07:00
Jeremy Stanley f14ad415ad Replace ci.o.o links with docs.o.o/infra
The http://ci.openstack.org/ documentation site has been deprecated,
replaced by redirects to corresponding paths within
http://docs.openstack.org/infra/ where other Project Infrastructure
documentation already resides.

Change-Id: Ia914d1802b57f7101dd86b2098857dd714763dd1
2015-05-14 21:38:20 +00:00
Dougal Matthews 33845ab55c Remove the unneeded horizontal scrollbar
Even on really large screens, the horizontal scrollbar is shown. This is
because the `div.related` class has a width of 100% in basic.css and in
tweaks.css a border is also defined. This causes the div to be two pixes
wider than the screen.

Change-Id: I2881d8eca99988ff8372b22aecc1a1a90c66a314
2015-04-09 15:17:40 +01:00
Anne Gentle 7ddfe1c965 Adds javascript footer for Google Analytics tracking
- Ensures tracking is across all openstack.org web properties
- Tracks only docs.openstack.org/developer/{{ project }} where
project name is taken from conf.py

Change-Id: Idfb2696f42ff17cbc6c3b72afcd2630b9ae01f0e
Closes-bug: 1441315
2015-04-08 16:27:26 -05:00
Doug Hellmann e1b0dca451 Speed up blueprint checking with naming convention
If the blueprint file is named beginning with the name of a project,
look there for the blueprint first.

Change-Id: I49cf48ed001945670ab900fcc76cd4c2087ddbb7
2015-02-24 19:02:12 -05:00
Doug Hellmann 7c282dc14a Allow alternate OpenStack themes
By default oslosphinx forces projects that use it to use the theme
contained in the package. The documentation team wants to provide a
separate theme for some parts of the docs.openstack.org site. They are
going to distribute it in their own package, but do still want to be
able to use other features of oslosphinx. This change allows any name
that starts "openstack" to be used, while retaining the default behavior
of inserting the "openstack" theme if a project is using a different
default or has not set a theme.

Change-Id: I7a2c5a5c3805685b8fa0baaa47393d5fec312f30
2015-01-26 17:10:43 -05:00
Doug Hellmann 4ce81f85fb Add an extension for validating blueprint names
This new extension requires spec filenames to match blueprint names in
the relevant project. This is based on work originally done in
oslo-specs under https://review.openstack.org/#/c/138392/

Change-Id: Ifd58f4f71f661229f09ecf01047bc7a7b1dc0b08
2014-12-09 15:49:01 -05:00
Sean Dague c7e307e359 provide visual separation in sidebar
Enhance the sidebar display to provide visual distinction between top
level items and lower level items. Top level items are now given a
space above them so they are visually clumped with their children, and
separated from each other. They are also emboldened for greater visual
distinction.

Ideally sphinx would actually tag li items with their depth as a class
tag, but as it currently doesn't do that we can work around it with
setting at ul li, and unsetting at ul li ul li.

Change-Id: I88d4317ec69fe7fd6f5c2198f89de624f0d093da
2014-11-17 09:12:22 -05:00
Graham Hayes 98c8c4b8ad Fixed link text colour for incubation variant
When using a link inside the h3.highlighted sidebar element the
text reverts to the default grey colour

Change-Id: I4e35abd6da42a5d9a7bb8c3b56fd4e8610e4e17c
2014-07-07 17:44:18 +01:00
Graham Hayes c144be8993 Added a incubating project config option
This allows projects that are currently incubated to use oslosphinx

To use a project needs to set

'html_theme_options = {'incubating': True}'

in their sphinx conf.py

This is option reflected by changing the side bar to have a bar
at the top that shows 'Incubated Project'

Change-Id: Ib5a06ac1749fec475d326afe19f16fffb8c7d4a7
2014-07-02 13:28:28 -05:00
Davanum Srinivas 40d720e732 Prevent left sidebar text overflow
Add break-word to stop the overflow from the sidebar to the main
content.

Change-Id: I5b2c60e439462f46eb0b24e5133593d293085c87
Closes-Bug: #1289548
2014-03-17 10:43:21 -04:00
ChangBo Guo(gcb) ba83cf44b5 Remove vim header
We don't need vim modelines in each source file, it can be set in
user's vimrc.

Change-Id: If4f0e93821e20ea837c1fc908845089dd192fcde
Closes-Bug: #1229324
2014-02-24 04:19:47 -05:00
Ben Nemec 28f4cf00a0 Remove references to oslo.sphinx
There were a few left over in the documentation

Change-Id: I87ca3e6c104798a94874916df355b6bdc74c1408
2014-02-12 16:41:37 +00:00
Doug Hellmann 229e16bde9 Rename package from oslo.sphinx to oslosphinx
Having the sphinx theme in the same namespace package
as the production code has been causing issues with
devstack installations. This change renames the package
to move it out of the namespace. Another change to the
openstack-infra/config repository will rename the
git repository and associated jobs.

Partial-bug: #1277168

Change-Id: I7788a9d6b5984fdfcc4678f2182104d2eb8a2be0
2014-02-06 08:59:53 -08:00