Skip to content
Open
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
4 changes: 2 additions & 2 deletions deploy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM debian:trixie AS sphinx

ARG GIT_BRANCH=main
RUN apt-get -q update && apt-get -qy upgrade && apt-get -qy install git make latexmk texlive-latex-extra python3-poetry
RUN apt-get -q update && apt-get -qy upgrade && apt-get -qy install git make chromium python3-poetry
COPY ./ .
RUN poetry install
RUN deploy/build $GIT_BRANCH
Expand All @@ -14,4 +14,4 @@ RUN mkdir -p /opt/nginx/run /opt/nginx/webroot/en/latest && chown -R nginx:nginx

USER nginx
COPY --from=sphinx --chown=nginx:nginx build/latest/html/ /opt/nginx/webroot/en/latest/
COPY --from=sphinx --chown=nginx:nginx build/latest/latex/SecureDropDevDocs.pdf /opt/nginx/webroot/en/latest/
COPY --from=sphinx --chown=nginx:nginx build/latest/singlehtml/SecureDropDevDocs.pdf /opt/nginx/webroot/en/latest/
13 changes: 11 additions & 2 deletions deploy/build
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,17 @@ do_build() {
git checkout "$1"

make html
# Remote-loaded SVGs will cause a build failure unless we use force-mode.
LATEXMKOPTS="-interaction=nonstopmode -f" make latexpdf || true
# Concatenate every page into one HTML file, then have headless Chromium
# print it to PDF. This replaces the old LaTeX-based `make latexpdf`.
make singlehtml
chromium \
--headless \
--no-sandbox \
--disable-gpu \
--virtual-time-budget=120000 \
--no-pdf-header-footer \
--print-to-pdf=docs/_build/singlehtml/SecureDropDevDocs.pdf \
"file://$(pwd)/docs/_build/singlehtml/index.html"

mkdir -p build
mv docs/_build "build/${2}"
Expand Down
60 changes: 0 additions & 60 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,66 +200,6 @@
# Output file base name for HTML help builder.
htmlhelp_basename = "SecureDropDevDocs"

# -- Options for LaTeX output ---------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
# Neither of:
# \usepackage[T1]{fontenc}
# \usepackage{textcomp}
# seem to make this magically work, so define individual characters.
# Also,
# \usepackage{svg}
# does not seem to allow inclusion of the Weblate status badge (over HTTPS,
# which may be the problem).
'preamble': r'''
\DeclareUnicodeCharacter{25B6}{$\blacktriangleright$}
\DeclareUnicodeCharacter{25B8}{$\blacktriangleright$}
\DeclareUnicodeCharacter{2B06}{$\uparrow$}
\DeclareUnicodeCharacter{2B07}{$\downarrow$}
\DeclareUnicodeCharacter{201C}{\textquotedblleft}
\DeclareUnicodeCharacter{201D}{\textquotedblright}
\DeclareUnicodeCharacter{00E2}{\^a}
\DeclareUnicodeCharacter{20AC}{\euro}
\DeclareUnicodeCharacter{0153}{\oe}
\DeclareUnicodeCharacter{FFFD}{$\blacklozenge$}
''',
# Latex figure (float) alignment
# 'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, "SecureDropDevDocs.tex", u"SecureDrop Developer Documentation", author, "manual"),
]

# The name of an image file (relative to this directory) to place at the top of
# the title page.
# latex_logo = None

# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
# latex_use_parts = False

# If true, show page references after internal links.
# latex_show_pagerefs = False

# If true, show URL addresses after external links.
# latex_show_urls = False

# Documents to append as an appendix to all manuals.
# latex_appendices = []

# If false, no module index is generated.
# latex_domain_indices = True


# -- Options for manual page output ---------------------------------------

# One entry per manual page. List of tuples
Expand Down