Skip to content

Commit 082585b

Browse files
author
Matthias Koeppe
committed
Merge branch 'p/deploy-live-doc-with-pdfs' into ci_docbuild_explicit_docker_exec
2 parents dcf6d6d + 400d0b8 commit 082585b

File tree

11 files changed

+155
-110
lines changed

11 files changed

+155
-110
lines changed

.github/workflows/doc-build.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,14 +173,15 @@ jobs:
173173
if: (success() || failure()) && steps.copy.outcome == 'success' && github.repository == 'sagemath/sage' && github.ref == 'refs/heads/develop'
174174
run: |
175175
export MAKE="make -j2 --output-sync=recurse" SAGE_NUM_THREADS=2
176+
export PATH="build/bin:$PATH"
177+
eval $(sage-print-system-package-command auto update)
178+
eval $(sage-print-system-package-command auto --yes --no-install-recommends install zip)
179+
eval $(sage-print-system-package-command auto --spkg --yes --no-install-recommends install git texlive)
176180
export SAGE_USE_CDNS=yes
177181
export SAGE_LIVE_DOC=yes
178182
export SAGE_JUPYTER_SERVER=binder:sagemath/sage-binder-env/dev
179183
make doc-clean doc-uninstall
180-
./config.status && make sagemath_doc_html-no-deps
181-
env:
182-
MAKE: make -j2 --output-sync=recurse
183-
SAGE_NUM_THREADS: 2
184+
./config.status && make sagemath_doc_html-no-deps sagemath_doc_pdf-no-deps
184185
shell: sh .ci/docker-exec-script.sh BUILD ./worktree-image {0}
185186

186187
- name: Copy live doc
@@ -189,6 +190,7 @@ jobs:
189190
run: |
190191
mkdir -p ./livedoc
191192
cp -r -L /sage/local/share/doc/sage/html ./livedoc
193+
cp -r -L /sage/local/share/doc/sage/pdf ./livedoc
192194
cp /sage/local/share/doc/sage/index.html ./livedoc
193195
zip -r livedoc.zip livedoc
194196
shell: sh .ci/docker-exec-script.sh BUILD . {0}

src/doc/Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,17 @@ doc-inventory-reference: doc-src
4646
$(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" doc-inventory--reference_top
4747
endif
4848

49-
# reference manual, html
50-
doc-html-reference: doc-inventory-reference
49+
# sub docs of reference manual, html
50+
doc-html-reference-sub: doc-inventory-reference
5151
$(eval DOCS = $(shell sage --docbuild --all-documents reference))
5252
@if [ -z "$(DOCS)" ]; then echo "Error: 'sage --docbuild --all-documents' failed"; exit 1; fi
5353
$(eval BIBLIO = $(firstword $(DOCS)))
5454
$(eval OTHER_DOCS = $(wordlist 2, 100, $(DOCS)))
5555
$(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" doc-html--$(subst /,-,$(BIBLIO))
5656
$(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" $(foreach doc, $(OTHER_DOCS), doc-html--$(subst /,-,$(doc)))
57+
58+
# reference manual, html; reference_top is built after sub docs
59+
doc-html-reference: doc-html-reference-sub
5760
$(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" doc-html--reference_top
5861

5962
# other documentation, html
@@ -79,16 +82,13 @@ doc-pdf-reference: doc-inventory-reference
7982
$(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" doc-pdf--reference_top
8083

8184
# other documentation, pdf
82-
doc-pdf-other: doc-html-reference
85+
doc-pdf-other: doc-pdf-reference
8386
$(eval DOCS = $(shell sage --docbuild --all-documents all))
8487
@if [ -z "$(DOCS)" ]; then echo "Error: 'sage --docbuild --all-documents' failed"; exit 1; fi
8588
$(MAKE) SAGE_DOCBUILD_OPTS="$(SAGE_DOCBUILD_OPTS) --no-prune-empty-dirs" $(foreach doc, $(wordlist 2, 100, $(DOCS)), doc-pdf--$(subst /,-,$(doc)))
8689

87-
# website with pdf links
88-
doc-pdf-website:
89-
sage --docbuild website html $(SAGE_DOCBUILD_OPTS)
90+
doc-pdf: doc-pdf-reference doc-pdf-other
9091

91-
doc-pdf: doc-pdf-reference doc-pdf-other doc-pdf-website
9292

9393
.PHONY: all clean \
9494
doc-src \

src/doc/common/static/custom-furo.css

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,13 @@ body[data-theme="dark"] div.highlight {
1111
background: #383838;
1212
}
1313

14+
/* Copied the style for a.pdf from website/templates/index_furo.html */
15+
16+
a.pdf {
17+
margin-right: 0.5em;
18+
}
19+
20+
a.pdf:hover {
21+
text-decoration: none;
22+
}
23+

src/doc/en/reference/references/index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -960,6 +960,13 @@ REFERENCES:
960960
.. [BL2003] \S. Brlek, A. Ladouceur, A note on differentiable palindromes,
961961
Theoret. Comput. Sci. 302 (2003) 167--178.
962962
963+
.. [BLL1998] \F. Bergeron, G. Labelle, and P. Leroux.
964+
"Combinatorial species and tree-like structures".
965+
Encyclopedia of Mathematics and its Applications, vol. 67, Cambridge Univ. Press. 1998.
966+
967+
.. [BLL2008] François Bergeron, Gilbert Labelle, and Pierre Leroux.
968+
"Introduction to the Theory of Species of Structures", March 14, 2008.
969+
963970
.. [BraLea2008] \C. Bracken and Gregor Leander: *New families of functions
964971
with differential uniformity of 4*, Proceedings of the Conference
965972
BFCA, Copenhagen, 2008.

src/doc/en/website/root_index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ <h1>Sage Documentation</h1>
118118
<div class='entry lang-en'><a href='pdf/en/prep/prep_tutorials.pdf'>PREP Tutorials</a></div>
119119
<div class='entry lang-en'><a href='pdf/en/constructions/constructions.pdf'>Constructions</a></div>
120120
<div class='entry lang-en'><a href='pdf/en/faq/faq.pdf'>FAQ</a></div>
121-
<div class='entry lang-en'><a href='pdf/en/reference/index.html'>Reference Manual</a></div>
121+
<div class='entry lang-en'><a href='html/en/reference/index-pdf.html'>Reference Manual</a></div>
122122
<div class='entry lang-en'><a href='pdf/en/installation/installation.pdf'>Installation Guide</a></div>
123123
<div class='entry lang-en'><a href='pdf/en/developer/developer.pdf'>Developer Guide</a></div>
124124
</div></div>

src/doc/en/website/templates/index.html

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ <h2>
4444
<tr valign="top">
4545
<td width="50%">
4646
<p class="biglink">
47-
<a class="biglink" href="a_tour_of_sage/index.html">
48-
A Tour of Sage
49-
</a>
5047
<a title="Download PDF" class="pdf" href="../../pdf/en/a_tour_of_sage/a_tour_of_sage.pdf">
5148
<img class="icon" src="_static/pdf.png"></img>
5249
</a>
50+
<a class="biglink" href="a_tour_of_sage/index.html">
51+
A Tour of Sage
52+
</a>
5353
<br>
5454
<span class="linkdescr">
5555
This is a tour of Sage that closely follows the tour of
@@ -60,12 +60,12 @@ <h2>
6060
</td>
6161
<td width="50%">
6262
<p class="biglink">
63-
<a class="biglink" href="prep/index.html">
64-
PREP Tutorials
65-
</a>
6663
<a title="Download PDF" class="pdf" href="../../pdf/en/prep/prep_tutorials.pdf">
6764
<img class="icon" src="_static/pdf.png"></img>
6865
</a>
66+
<a class="biglink" href="prep/index.html">
67+
PREP Tutorials
68+
</a>
6969
<br>
7070
<span class="linkdescr">
7171
This set of tutorials takes the reader from very minimal
@@ -80,12 +80,12 @@ <h2>
8080
<tr valign="top">
8181
<td width="50%">
8282
<p class="biglink">
83-
<a class="biglink" href="tutorial/index.html">
84-
Tutorial
85-
</a>
8683
<a title="Download PDF" class="pdf" href="../../pdf/en/tutorial/sage_tutorial.pdf">
8784
<img class="icon" src="_static/pdf.png"></img>
8885
</a>
86+
<a class="biglink" href="tutorial/index.html">
87+
Tutorial
88+
</a>
8989
<br>
9090
<span class="linkdescr">
9191
This tutorial is the best way to become familiar with Sage
@@ -95,12 +95,12 @@ <h2>
9595
</td>
9696
<td width="50%">
9797
<p class="biglink">
98-
<a class="biglink" href="constructions/index.html">
99-
Constructions
100-
</a>
10198
<a title="Download PDF" class="pdf" href="../../pdf/en/constructions/constructions.pdf">
10299
<img class="icon" src="_static/pdf.png"></img>
103100
</a>
101+
<a class="biglink" href="constructions/index.html">
102+
Constructions
103+
</a>
104104
<br>
105105
<span class="linkdescr">
106106
This document collects answers to some questions along the line "How
@@ -113,12 +113,12 @@ <h2>
113113
<tr valign="top">
114114
<td width="50%">
115115
<p class="biglink">
116-
<a class="biglink" href="thematic_tutorials/index.html">
117-
Thematic Tutorials
118-
</a>
119116
<a title="Download PDF" class="pdf" href="../../pdf/en/thematic_tutorials/thematic_tutorials.pdf">
120117
<img class="icon" src="_static/pdf.png"></img>
121118
</a>
119+
<a class="biglink" href="thematic_tutorials/index.html">
120+
Thematic Tutorials
121+
</a>
122122
<br>
123123
<span class="linkdescr">
124124
A collection of in-depth tutorials on specific topics. These
@@ -133,12 +133,12 @@ <h2>
133133
</td>
134134
<td width="50%">
135135
<p class="biglink">
136-
<a class="biglink" href="faq/index.html">
137-
FAQ
138-
</a>
139136
<a title="Download PDF" class="pdf" href="../../pdf/en/faq/faq.pdf">
140137
<img class="icon" src="_static/pdf.png"></img>
141138
</a>
139+
<a class="biglink" href="faq/index.html">
140+
FAQ
141+
</a>
142142
<br>
143143
<span class="linkdescr">
144144
A collection of frequently asked questions, together with
@@ -158,12 +158,12 @@ <h2>
158158
<tr valign="top">
159159
<td width="50%">
160160
<p class="biglink">
161+
<a title="Link to PDF" class="pdf" href="reference/index-pdf.html">
162+
<img class="icon" src="_static/pdf.png"></img>
163+
</a>
161164
<a class="biglink" href="reference/index.html">
162165
Reference Manual
163166
</a>
164-
<a title="Link to PDF" class="pdf" href="../../pdf/en/reference/index.html">
165-
<img class="icon" src="_static/pdf.png"></img>
166-
</a>
167167
<br>
168168
<span class="linkdescr">
169169
This is the reference manual for the Sage mathematics
@@ -189,12 +189,12 @@ <h2>
189189
<tr valign="top">
190190
<td width="50%">
191191
<p class="biglink">
192-
<a class="biglink" href="installation/index.html">
193-
Installation Guide
194-
</a>
195192
<a title="Download PDF" class="pdf" href="../../pdf/en/installation/installation.pdf">
196193
<img class="icon" src="_static/pdf.png"></img>
197194
</a>
195+
<a class="biglink" href="installation/index.html">
196+
Installation Guide
197+
</a>
198198
<br>
199199
<span class="linkdescr">
200200
A guide on how to install Sage. You can install a Sage
@@ -206,12 +206,12 @@ <h2>
206206
</td>
207207
<td width="50%">
208208
<p class="biglink">
209-
<a class="biglink" href="developer/index.html">
210-
Developer Guide
211-
</a>
212209
<a title="Download PDF" class="pdf" href="../../pdf/en/developer/developer.pdf">
213210
<img class="icon" src="_static/pdf.png"></img>
214211
</a>
212+
<a class="biglink" href="developer/index.html">
213+
Developer Guide
214+
</a>
215215
<br>
216216
<span class="linkdescr">
217217
This document describes guidelines and policies regarding

0 commit comments

Comments
 (0)