Posted to tcl by oldlaptop at Thu Feb 25 13:42:13 GMT 2021view pretty

Should apply to a clean fossil tree; test with `make html DISTDIR=.` or so in a ./configured build directory.

Index: tools/tcltk-man2html-utils.tcl
==================================================================
--- tools/tcltk-man2html-utils.tcl
+++ tools/tcltk-man2html-utils.tcl
@@ -75,18 +75,22 @@
 }
 
 proc DOCTYPE {} {
     return "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">"
 }
+
+proc magicmeta {} {
+       return {<META NAME="viewport" CONTENT="width=device-width, initial-scale=1">}
+}
 
 proc htmlhead {title header args} {
     set level ""
     if {[lindex $args end] eq "../[indexfile]"} {
        # XXX hack - assume same level for CSS file
        set level "../"
     }
-    set out "[DOCTYPE]\n<HTML>\n<HEAD><TITLE>$title</TITLE>\n[CSS $level]</HEAD>\n"
+    set out "[DOCTYPE]\n<HTML>\n<HEAD>\n[magicmeta]\n<TITLE>$title</TITLE>\n[CSS $level]</HEAD>\n"
     foreach {uptitle url} $args {
        set header "<a href=\"$url\">$uptitle</a> <small>&gt;</small> $header"
     }
     append out "<BODY><H2>$header</H2>"
     global manual