From 34477d3793d308de20711a4df48f7823c91baaba Mon Sep 17 00:00:00 2001 From: Gervase Markham Date: Tue, 25 Feb 2014 12:00:48 +0000 Subject: Bug 963120 - allow extensions to document themselves, and build result into docs. r=LpSolit, a=justdave. --- docs/en/rst/extensions.rst | 11 +++++++++++ docs/en/rst/index.rst | 3 ++- docs/makedocs.pl | 20 ++++++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 docs/en/rst/extensions.rst (limited to 'docs') 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'); -- cgit v1.2.3-24-g4f1b