diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/en/rst/conf.py | 11 | ||||
-rwxr-xr-x | docs/makedocs.pl | 10 |
2 files changed, 13 insertions, 8 deletions
diff --git a/docs/en/rst/conf.py b/docs/en/rst/conf.py index 34acb4778..cbd418cf8 100644 --- a/docs/en/rst/conf.py +++ b/docs/en/rst/conf.py @@ -383,13 +383,10 @@ pdf_fit_background_mode = 'scale' # Temporary highlighting of TODO items todo_include_todos = False -# 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/5.0/en/html/integrating/api/' -else: - base_api_url = '../integrating/api/' +# Originally, the readthedocs.org website could not access POD, +# so we would conditionally override that here if we were building +# on RTD, but that's no longer the case. +base_api_url = '../integrating/api/' extlinks = {'bug': ('https://bugzilla.mozilla.org/show_bug.cgi?id=%s', 'bug '), 'api': (base_api_url + '%s', '')} diff --git a/docs/makedocs.pl b/docs/makedocs.pl index 36ffc45b5..8e11de02a 100755 --- a/docs/makedocs.pl +++ b/docs/makedocs.pl @@ -33,6 +33,7 @@ BEGIN { chdir dirname($0); } use lib qw(.. ../lib lib); use Cwd; +use File::Copy qw(copy); use File::Copy::Recursive qw(rcopy); use File::Find; use File::Path qw(rmtree make_path); @@ -82,12 +83,19 @@ END_HTML $converter->contents_page_start($contents_start); $converter->contents_page_end("</body></html>"); - $converter->add_css('./../../../../style.css'); + if (exists($::ENV{'READTHEDOCS'})) { + $converter->add_css('./../../style.css'); + } else { + $converter->add_css('./../../../../style.css'); + } $converter->javascript_flurry(0); $converter->css_flurry(0); make_path('html/integrating/api'); $converter->batch_convert(['../../'], 'html/integrating/api'); + if (exists($::ENV{'READTHEDOCS'})) { + copy('../style.css', 'html/style.css') or die "Copy failed: $!"; + } print "\n"; } |