commit b97caf797344ce5ceabf46e9f443fae51609aa1c
parent fdb06cfc11194435e7d0d06fcc4245a326ab5f83
Author: Greg Hendershott <greghendershott@gmail.com>
Date: Fri, 26 Oct 2012 16:37:59 -0400
Delete unused web font. Re-org the code.
Diffstat:
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/add-to-head.rkt b/add-to-head.rkt
@@ -4,7 +4,8 @@
;;
;; AFIK no way via Scribble to put something into the <head> section.
;;
-;; This takes "main.html", adds some GA code, and outputs "index.html".
+;; This reads "main.html", injects some stuff immediately before the
+;; </head> closing tag, writes to "index.html".
(define web-font
"<link href='http://fonts.googleapis.com/css?family=Fenix' rel='stylesheet' type='text/css'>")
@@ -22,11 +23,12 @@ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www')
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
-</head>
EOF
)
-(define all (string-append web-font ga-code))
+(define </head> "</head>")
+
+(define all (string-append web-font ga-code </head>))
(define subst (regexp-replace* "\n" all "")) ;minify
(define old (file->string "main.html"))