summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorFrédéric Buclin <LpSolit@gmail.com>2016-04-09 01:32:24 +0200
committerFrédéric Buclin <LpSolit@gmail.com>2016-04-09 01:32:24 +0200
commitfb7c253e86deaa46790a8a1874fa976c9771e677 (patch)
tree6c08acd49720a87ddf4c32edcbf9997f5e52fd97 /docs
parentfa360bee1863b1cb715a29966567ae08118de9a5 (diff)
downloadbugzilla-fb7c253e86deaa46790a8a1874fa976c9771e677.tar.gz
bugzilla-fb7c253e86deaa46790a8a1874fa976c9771e677.tar.xz
Bug 1204957 - Locally compiled POD documentation is no longer accessible from docs/en/html/api/
r=dkl
Diffstat (limited to 'docs')
-rw-r--r--docs/en/rst/api/index.rst3
-rw-r--r--docs/en/rst/conf.py11
-rw-r--r--docs/en/rst/integrating/apis.rst13
-rwxr-xr-xdocs/makedocs.pl10
4 files changed, 25 insertions, 12 deletions
diff --git a/docs/en/rst/api/index.rst b/docs/en/rst/api/index.rst
index 45055eba1..840bcadd1 100644
--- a/docs/en/rst/api/index.rst
+++ b/docs/en/rst/api/index.rst
@@ -4,7 +4,8 @@ WebService API Reference
========================
This Bugzilla installation has the following WebService APIs available
-(as of the last time you compiled the documentation):
+(as of the last time you compiled the documentation). Documentation for
+the deprecated :ref:`XML-RPC and JSON-RPC APIs <api-list>` is also available.
.. toctree::
:glob:
diff --git a/docs/en/rst/conf.py b/docs/en/rst/conf.py
index 10d18cadb..31437294d 100644
--- a/docs/en/rst/conf.py
+++ b/docs/en/rst/conf.py
@@ -385,7 +385,16 @@ pdf_fit_background_mode = 'scale'
# Temporary highlighting of TODO items
todo_include_todos = True
-extlinks = {'bug': ('https://bugzilla.mozilla.org/show_bug.cgi?id=%s', 'bug ')}
+# The readthedocs.org website cannot access POD.
+on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
+
+if on_rtd:
+ base_api_url = 'https://www.bugzilla.org/docs/tip/en/html/api/'
+else:
+ base_api_url = '../integrating/api/'
+
+extlinks = {'bug': ('https://bugzilla.mozilla.org/show_bug.cgi?id=%s', 'bug '),
+ 'api': (base_api_url + '%s', '')}
# -- Assemble extension documentation ------------------------------------------
diff --git a/docs/en/rst/integrating/apis.rst b/docs/en/rst/integrating/apis.rst
index 6067c12df..54ee3273a 100644
--- a/docs/en/rst/integrating/apis.rst
+++ b/docs/en/rst/integrating/apis.rst
@@ -12,6 +12,13 @@ coming soon.
The APIs currently available are as follows:
+Core Module API
+===============
+
+Most of the core Bugzilla modules have extensive documentation inside the modules
+themselves. You can view the :api:`POD documentation <index.html>` to help with
+using the core modules in your extensions.
+
Ad-Hoc APIs
===========
@@ -23,8 +30,7 @@ to alternate data formats where they are available.
XML-RPC
=======
-Bugzilla has an `XML-RPC API
-<http://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService/Server/XMLRPC.html>`_.
+Bugzilla has an :api:`XML-RPC API <Bugzilla/WebService/Server/XMLRPC.html>`.
This will receive no further updates and will be removed in a future version
of Bugzilla.
@@ -33,8 +39,7 @@ Endpoint: :file:`/xmlrpc.cgi`
JSON-RPC
========
-Bugzilla has a `JSON-RPC API
-<http://www.bugzilla.org/docs/tip/en/html/api/Bugzilla/WebService/Server/JSONRPC.html>`_.
+Bugzilla has a :api:`JSON-RPC API <Bugzilla/WebService/Server/JSONRPC.html>`.
This will receive no further updates and will be removed in a future version
of Bugzilla.
diff --git a/docs/makedocs.pl b/docs/makedocs.pl
index 81d098a94..2d57fc9a5 100755
--- a/docs/makedocs.pl
+++ b/docs/makedocs.pl
@@ -34,7 +34,7 @@ use lib qw(.. ../lib lib ../local/lib/perl5);
use Cwd;
use File::Copy::Recursive qw(rcopy);
-use File::Path qw(rmtree);
+use File::Path qw(rmtree make_path);
use File::Which qw(which);
use Pod::Simple;
@@ -51,7 +51,6 @@ sub MakeDocs {
my ($name, $cmdline) = @_;
say "Creating $name documentation ..." if defined $name;
- say "make $cmdline\n";
system('make', $cmdline) == 0
or $error_found = 1;
print "\n";
@@ -82,12 +81,11 @@ END_HTML
$converter->contents_page_start($contents_start);
$converter->contents_page_end("</body></html>");
- $converter->add_css('./../../../style.css');
+ $converter->add_css('./../../../../style.css');
$converter->javascript_flurry(0);
$converter->css_flurry(0);
- mkdir("html");
- mkdir("html/api");
- $converter->batch_convert(['../../'], 'html/api/');
+ make_path('html/integrating/api');
+ $converter->batch_convert(['../../'], 'html/integrating/api');
print "\n";
}