[committed] wwwdocs: style: Simplify handling of <head> containers

Message ID 20221021071435.00F4633E4A@hamza.pair.com
State Committed
Headers
Series [committed] wwwdocs: style: Simplify handling of <head> containers |

Commit Message

Gerald Pfeifer Oct. 21, 2022, 7:14 a.m. UTC
  This is the change actually triggering most of my changes the last week.
With that most of our web pages - the main page is still WIP - should now 
pass validator.w3.org again:

Lose the trailing slash in <link rel="shortcut icon"> which we needed to
validate (most pages) as XHTML.

With that we no longer need to differentiate between XHTML and HTML pages
as much and can simplify the logic quite a bit. (Now only pages setting a
MetaHTML variable ADDSTYLE receive special treatment.)
---
 htdocs/style.mhtml | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
  

Patch

diff --git a/htdocs/style.mhtml b/htdocs/style.mhtml
index 08def35e..98641c25 100644
--- a/htdocs/style.mhtml
+++ b/htdocs/style.mhtml
@@ -1,13 +1,12 @@ 
 ;;; Set a couple of site-wide defaults, some of which we'll override in the
 ;;; following.
 
-<set-var NOSTYLE>
 <set-var BACKPATH>
 
 ;;; The pages under install/ are generated from texinfo sources.
 
 <if <match <get-var env::PREPROCESS_FILE> "install/.*">
-  <unset-var NOSTYLE>
+  <set-var ADDSTYLE>
 >
 
 ;;; Redefine the <head> tag so that we can add default <meta /> headers.
@@ -16,16 +15,13 @@ 
  <verbatim>
   <head>
  </verbatim>
- <if <var-exists NOSTYLE>
-  <group
-    <link rel="shortcut icon" href="https://gcc.gnu.org/favicon.ico" />
-  >
+ <if <var-exists ADDSTYLE>
   <group
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-    <link rel="shortcut icon" href="https://gcc.gnu.org/favicon.ico">
     <link rel="stylesheet" type="text/css" href="/gcc.css">
   >
  >
+ <link rel="shortcut icon" href="https://gcc.gnu.org/favicon.ico">
  %body
  <verbatim>
   </head>