]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 1204957 - Locally compiled POD documentation is no longer accessible from docs...
authorFrédéric Buclin <LpSolit@gmail.com>
Fri, 8 Apr 2016 23:33:30 +0000 (01:33 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Fri, 8 Apr 2016 23:33:30 +0000 (01:33 +0200)
r=dkl

docs/en/rst/api/index.rst
docs/en/rst/conf.py
docs/en/rst/integrating/apis.rst
docs/makedocs.pl

index 45055eba1add56f12d7c9cec34249d08982eef6d..840bcadd197b76b527849dded150af3a4b304c01 100644 (file)
@@ -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:
index 3330ca76d1beca6373360c435100ed7ed6540a5a..87109da841136b8813c5927daf15cd9de86fe16a 100644 (file)
@@ -383,4 +383,13 @@ pdf_fit_background_mode = 'scale'
 # Temporary highlighting of TODO items
 todo_include_todos = False
 
-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', '')}
index 6067c12dffe2aab3fb25901a7330dd1cb594c67e..54ee3273a12368911619827a4e9cde3e05f1a6c1 100644 (file)
@@ -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.
 
index 6f353dc6dad04c36ac3d2a730878e3afa63a660f..36ffc45b563cff085950ec6c11e9bf7a87245759 100755 (executable)
@@ -35,7 +35,7 @@ use lib qw(.. ../lib lib);
 use Cwd;
 use File::Copy::Recursive qw(rcopy);
 use File::Find;
-use File::Path qw(rmtree);
+use File::Path qw(rmtree make_path);
 use File::Which qw(which);
 use Pod::Simple;
 
@@ -52,7 +52,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";
@@ -83,12 +82,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";
 }