Index: code-docs/snippets-html.scrbl ================================================================== --- code-docs/snippets-html.scrbl +++ code-docs/snippets-html.scrbl @@ -48,13 +48,19 @@ }) } @section{HTML Snippet functions} -@defproc[(html$-page-head [title (or/c string? #f) #f]) non-empty-string?] +@defproc[(html$-page-head [title (or/c string? #f) #f] [close-head? boolean? #t]) non-empty-string?] + +Returns the @tt{} section of an HTML document. + +If @racket[_title] is a string it will be used inside the @tt{} tag. -Returns the @tt{<head>} section of an HTML document. +If you want to include additional stuff inside the @tt{<head>}, you can set @racket[_close-head?] to +@racket[#f] to prevent it from including the closing @tt{</head>} tag (you’ll have to add it +yourself). @defproc[(html$-page-body-open [body-class string? ""]) non-empty-string?] Returns the opening @tt{<body>} and @tt{<main>} tags and elements that immediately follow, such as site header, logo and navigation. Index: snippets-html.rkt ================================================================== --- snippets-html.rkt +++ snippets-html.rkt @@ -26,18 +26,18 @@ html$-note-listing-full html$-note-in-article html$-notes-section html$-paginate-navlinks) -(define (html$-page-head [title #f]) +(define (html$-page-head [title #f] [close-head? #t]) ◊string-append{<head> <title>◊if[title title ""] - }) + ◊if[close-head? "" ""]}) (define (html$-page-body-open [class ""]) (define body-class (if (non-empty-string? class) (format " class=\"~a\"" class) "")) ◊string-append{