Skip to content
Merged
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
14 changes: 5 additions & 9 deletions src/sage_docbuild/builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -654,11 +654,11 @@ def _output_dir(self, type, lang=None):
os.makedirs(d, exist_ok=True)
return d

def pdf(self):
def html(self):
"""
Build top-level document.
Build the top-level document.
"""
super().pdf()
super().html()

# We want to build master index file which lists all of the PDF file.
# We modify the file index.html from the "reference_top" target, if it
Expand All @@ -668,12 +668,8 @@ def pdf(self):
reference_dir = os.path.join(SAGE_DOC, 'html', 'en', 'reference')
output_dir = self._output_dir('html')

# Check if the top reference index.html exists.
try:
with open(os.path.join(reference_dir, 'index.html')) as f:
html = f.read()
except FileNotFoundError:
return
with open(os.path.join(reference_dir, 'index.html')) as f:
html = f.read()

# Install in output_dir a symlink to the directory containing static files.
# Prefer relative path for symlinks.
Expand Down