Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1849943: get doc build working on RTD site #140

Merged
merged 5 commits into from
Aug 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
version: 2
build:
os: "ubuntu-20.04"
os: "ubuntu-22.04"
tools:
python: "3.10"
python: "3.11"
apt_packages:
- libfile-copy-recursive-perl
jobs:
post_build:
- perl docs/makedocs.pl --pod-only
- cp -rp docs/en/html/integrating/api/ "$READTHEDOCS_OUTPUT/html/integrating/api"
- cp -p docs/en/html/style.css "$READTHEDOCS_OUTPUT/html/"
sphinx:
configuration: docs/en/rst/conf.py
python:
install:
- requirements: docs/requirements.txt
17 changes: 12 additions & 5 deletions docs/makedocs.pl
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@
use lib qw(.. ../lib lib ../local/lib/perl5);

use Cwd;
use File::Copy qw(copy);
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;

Expand Down Expand Up @@ -84,13 +85,19 @@ sub make_pod {

$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);
mkdir("html");
mkdir("html/api");
$converter->batch_convert(['../../'], 'html/api/');
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";
}

Expand Down
3 changes: 3 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
sphinx==5.3.0
sphinx_rtd_theme==1.3.0
readthedocs-sphinx-search==0.3.2
Loading