Skip to content

Commit caa6d83

Browse files
claudespoorcc
authored andcommitted
Fix title page to single page, add version to filename and front page
- Set release = __version__ so \py@release renders the version on the title page - Use \includegraphics[width=0.35\linewidth] instead of \sphinxlogo to constrain the logo size; \sphinxlogo has no width limit and caused the title page to spill across 3 pages when the PNG natural resolution was large - Replace double \vfill with \vspace*{\fill} so the two rules and centered block sit correctly within the single titlepage environment - Include version in latex_documents filename: dfetch-<version>.pdf - Update docs.yml artifact/release paths to dfetch-*.pdf glob https://claude.ai/code/session_014hVQ5UrK1B4N9ar4UfYpm4
1 parent 5ff3339 commit caa6d83

2 files changed

Lines changed: 14 additions & 11 deletions

File tree

.github/workflows/docs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,14 @@ jobs:
101101
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
102102
with:
103103
name: dfetch-pdf-documentation
104-
path: doc/_build/latex/dfetch.pdf
104+
path: doc/_build/latex/dfetch-*.pdf
105105

106106
- name: Upload PDF to release
107107
if: ${{ inputs.release_id }}
108108
uses: softprops/action-gh-release@153bb8e04406b158c6c84fc1615b65b24149a1fe # v2.5.0
109109
with:
110110
tag_name: ${{ inputs.release_id }}
111-
files: doc/_build/latex/dfetch.pdf
111+
files: doc/_build/latex/dfetch-*.pdf
112112
draft: true
113113
preserve_order: true
114114
env:

doc/conf.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
# The short X.Y version.
8181
version = __version__
8282
# The full version, including alpha/beta/rc tags.
83-
release = ""
83+
release = __version__
8484

8585
# The language for content autogenerated by Sphinx. Refer to documentation
8686
# for a list of supported languages.
@@ -220,23 +220,26 @@
220220
# Custom title page with amber header bar, logo, and accent footer.
221221
# \makeatletter/\makeatother are required to access \py@release (@ is a
222222
# letter in LaTeX package code but not in regular document mode).
223+
# \sphinxlogo is NOT used here because it has no size constraint; instead
224+
# we include the logo directly with an explicit width to keep the page count
225+
# at exactly one regardless of the image's natural resolution.
223226
"maketitle": r"""
224227
\makeatletter
225228
\begin{titlepage}
226229
\noindent{\color{dfprimary}\rule{\linewidth}{6pt}}\par
227-
\vfill
230+
\vspace*{\fill}
228231
\begin{center}
229-
\sphinxlogo\par
230-
\vspace{1.8cm}
232+
\includegraphics[width=0.35\linewidth]{dfetch_logo.png}\par
233+
\vspace{1.2cm}
231234
{\fontsize{40}{44}\selectfont\bfseries\color{dfprimary}Dfetch\par}
232-
\vspace{0.4cm}
235+
\vspace{0.3cm}
233236
{\LARGE\color{dfnearblack}Documentation\par}
234-
\vspace{0.8cm}
237+
\vspace{0.6cm}
235238
{\large\color{dftextmuted}\textit{vendor dependencies without the pain}\par}
236-
\vspace{2.5cm}
239+
\vspace{1.5cm}
237240
{\large\color{dftextmuted}\py@release\par}
238241
\end{center}
239-
\vfill
242+
\vspace*{\fill}
240243
\noindent{\color{dfaccent}\rule{\linewidth}{4pt}}\par
241244
\end{titlepage}
242245
\makeatother
@@ -247,7 +250,7 @@
247250
# (source start file, target name, title,
248251
# author, documentclass [howto, manual, or own class]).
249252
latex_documents = [
250-
(master_doc, "dfetch.tex", "Dfetch Documentation", "Dfetch", "manual"),
253+
(master_doc, f"dfetch-{__version__}.tex", "Dfetch Documentation", "Dfetch", "manual"),
251254
]
252255

253256

0 commit comments

Comments
 (0)