[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
emacs-28 908e2e09d0: Fix commands used to produce on-line HTML docs
From: |
Eli Zaretskii |
Subject: |
emacs-28 908e2e09d0: Fix commands used to produce on-line HTML docs |
Date: |
Sat, 28 May 2022 08:00:04 -0400 (EDT) |
branch: emacs-28
commit 908e2e09d08c8058f40295096aec9251944875ca
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>
Fix commands used to produce on-line HTML docs
* admin/admin.el (manual-meta-string): Only include the first
line, and move the rest...
(manual-links-string): ...to this new string.
(manual-html-fix-headers): Don't remove the '<meta name=' elements
produced by makeinfo, especially not the 'name="viewport"' one,
which is essential for viewing the docs on mobile devices.
Reported by "Facundo Lander via RT" <webmasters-comment@gnu.org>,
see gnu.org ticket #1840138.
---
admin/admin.el | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/admin/admin.el b/admin/admin.el
index a6cb33017e..57d5afb23b 100644
--- a/admin/admin.el
+++ b/admin/admin.el
@@ -340,11 +340,13 @@ Optional argument TYPE is type of output (nil means all)."
\"https://www.w3.org/TR/html4/loose.dtd\">\n\n")
(defconst manual-meta-string
- "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">
-<link rev=\"made\" href=\"mailto:bug-gnu-emacs@gnu.org\">
+ "<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n")
+
+(defconst manual-links-string
+ "<link rev=\"made\" href=\"mailto:bug-gnu-emacs@gnu.org\">
<link rel=\"icon\" type=\"image/png\" href=\"/graphics/gnu-head-mini.png\">
<meta name=\"ICBM\" content=\"42.256233,-71.006581\">
-<meta name=\"DC.title\" content=\"gnu.org\">\n\n")
+<meta name=\"DC.title\" content=\"gnu.org\">\n")
(defconst manual-style-string "<style type=\"text/css\">
@import url('/software/emacs/manual.css');\n</style>\n")
@@ -475,6 +477,12 @@ the @import directive."
(delete-region opoint (point))
(search-forward "<meta http-equiv=\"Content-Style")
(setq opoint (match-beginning 0)))
+ (search-forward "</title>\n")
+ (delete-region opoint (point))
+ (search-forward "<link href=")
+ (goto-char (match-beginning 0))
+ (insert manual-links-string)
+ (setq opoint (point))
(search-forward "</head>")
(goto-char (match-beginning 0))
(delete-region opoint (point))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- emacs-28 908e2e09d0: Fix commands used to produce on-line HTML docs,
Eli Zaretskii <=