Bug#1032440: www.d.o: please link to single html page version of developers-reference
Laura Arjona Reina <[email protected]>
| Newsgroups | gmane.linux.debian.devel.www |
|---|---|
| Message-ID | <1329d1fd-2631-2111-a063-596b1af9bfb2__1349.00259306363$1678818644$gmane$org@debian.org> |
Control: tags -1 patch Hello I'm attaching a patch that adds some logic to show manuals in single page html, and added that new "format" to the developers-reference manual definition. If anybody can improve it, please do. If nobody objects, I'll commit the patch in several days, and later will see if I can add this format to some other manuals, and update language tags so the "HTML (single page)" can be translated. Kind regards, -- Laura Arjona Reina https://wiki.debian.org/LauraArjona El 6/3/23 a las 21:00, Holger Levsen escribió: > package: www.debian.org > severity: wishlist > x-debbugs-cc: [email protected] > > hi, > > On Mon, Mar 06, 2023 at 07:46:43PM +0000, Holger Levsen wrote: >> [...], there's a single page HTML version available again, eg on >> https://www.debian.org/doc/manuals/developers-reference/developers-reference.html >> which could be linked from https://www.debian.org/doc/devel-manuals#devref >> again. > > & thank you for maintaining www.debian.org! > >
1032440_single_page_html.patch
(text/x-patch, 2.4 KB)
From 436b254ce58fc84ae9956a33135d644371c65663 Mon Sep 17 00:00:00 2001 From: Laura Arjona Reina <[email protected]> Date: Tue, 14 Mar 2023 19:08:46 +0100 Subject: [PATCH] Add logic to show developers reference manual in single page HTML (Closes: #1032440) --- english/doc/devel-manuals.defs | 2 +- english/doc/manuals.defs | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/english/doc/devel-manuals.defs b/english/doc/devel-manuals.defs index 4a789a21abc..7e545bf6198 100644 --- a/english/doc/devel-manuals.defs +++ b/english/doc/devel-manuals.defs @@ -21,7 +21,7 @@ <inddpvcs name="developers-reference" naming="locale" langs="en de fr it ja ru" - formats="html pdf txt epub" + formats="html singlepagehtml pdf txt epub" srctype="restructuredText" vcstype="git" vcsweb="https://salsa.debian.org/debian/developers-reference" diff --git a/english/doc/manuals.defs b/english/doc/manuals.defs index bc26445b125..4c6fad930b1 100644 --- a/english/doc/manuals.defs +++ b/english/doc/manuals.defs @@ -114,8 +114,14 @@ <set-var baselink=<get-var basename /> /> /> <if <get-var add-lang-ext /> + <if <match <get-var format /> "^singlepagehtml$" action=report /> + <set-var loc="<get-var baselink />.<get-var extlang />.html" /> <set-var loc="<get-var baselink />.<get-var extlang />.<get-var format />" /> + /> + <if <match <get-var format /> "^singlepagehtml$" action=report /> + <set-var loc="<get-var baselink />.<get-var format />.html" /> <set-var loc="<get-var baselink />.<get-var format />" /> + /> /> <when <match <get-var add-lang-ext /> "^$" action=report />> <when <match <get-var index /> "^index$" action=report />> @@ -130,6 +136,9 @@ <when <match <get-var format /> "txt" action=report />> <set-var txt=<gettext domain="doc">plain text</gettext> /> </when> + <when <match <get-var format /> "singlepagehtml$" action=report />> + <set-var txt=<gettext domain="doc">HTML (single page)</gettext> /> + </when> [<a href="<get-var path />/<get-var loc />"><get-var txt /></a>] # <if <match <get-var format /> "(html|txt|pdf|ps)" action=report /> "" # <exit message="you must pass a valid format to the inddpvcs tag" /> -- 2.30.2