summaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorGervase Markham <gerv@gerv.net>2014-02-25 13:00:48 +0100
committerGervase Markham <gerv@mozilla.org>2014-02-25 13:00:48 +0100
commit34477d3793d308de20711a4df48f7823c91baaba (patch)
tree28da01ac0931a0f5858e9a793fa1a32f975a723c /docs
parentef925d6942a3462a9c1d52406a6145b5e31faefb (diff)
downloadbugzilla-34477d3793d308de20711a4df48f7823c91baaba.tar.gz
bugzilla-34477d3793d308de20711a4df48f7823c91baaba.tar.xz
Bug 963120 - allow extensions to document themselves, and build result into docs. r=LpSolit, a=justdave.
Diffstat (limited to 'docs')
-rw-r--r--docs/en/rst/extensions.rst11
-rw-r--r--docs/en/rst/index.rst3
-rwxr-xr-xdocs/makedocs.pl20
3 files changed, 33 insertions, 1 deletions
diff --git a/docs/en/rst/extensions.rst b/docs/en/rst/extensions.rst
new file mode 100644
index 000000000..91eaab952
--- /dev/null
+++ b/docs/en/rst/extensions.rst
@@ -0,0 +1,11 @@
+Extensions
+==========
+
+Your Bugzilla installation has the following extensions available (as of the
+last time you compiled the documentation):
+
+.. toctree::
+ :maxdepth: 1
+ :glob:
+
+ extensions/*
diff --git a/docs/en/rst/index.rst b/docs/en/rst/index.rst
index abb63d0ee..f2bd14f18 100644
--- a/docs/en/rst/index.rst
+++ b/docs/en/rst/index.rst
@@ -15,8 +15,9 @@ Bugzilla Documentation
administration
security
using
+ extensions
customization
- troubleshooting
patches
+ troubleshooting
modules
gfdl
diff --git a/docs/makedocs.pl b/docs/makedocs.pl
index deb117ff3..d14e79434 100755
--- a/docs/makedocs.pl
+++ b/docs/makedocs.pl
@@ -25,6 +25,8 @@ use 5.10.1;
use strict;
use Cwd;
+use File::Find;
+use File::Copy;
# We need to be in this directory to use our libraries.
BEGIN {
@@ -122,6 +124,24 @@ foreach my $lang (@langs) {
next if grep { $_ eq '--pod-only' } @ARGV;
+ # Collect up local extension documentation into the extensions/ dir.
+ sub wanted {
+ if ($File::Find::dir =~ /\/doc\/?$/ &&
+ $_ =~ /\.rst$/)
+ {
+ copy($File::Find::name, "rst/extensions");
+ }
+ };
+
+ # Clear out old extensions docs
+ rmtree('rst/extensions', 0, 1);
+ mkdir('rst/extensions');
+
+ find({
+ 'wanted' => \&wanted,
+ 'no_chdir' => 1,
+ }, "$docparent/../extensions");
+
MakeDocs('HTML', 'make html');
MakeDocs('TXT', 'make text');