Build multiple HTMLs
This commit is contained in:
parent
16bbc60944
commit
1dd377cc5f
2
.gitignore
vendored
2
.gitignore
vendored
|
@ -1,2 +1,2 @@
|
|||
.DS_Store
|
||||
main.html
|
||||
index/
|
||||
|
|
|
@ -41,9 +41,15 @@ EOF
|
|||
(define all (string-append metas web-font ga-code </head>))
|
||||
(define subst (regexp-replace* "\n" all "")) ;minify
|
||||
|
||||
(define old (file->string "main.html"))
|
||||
(define new (regexp-replace "</head>" old subst))
|
||||
(with-output-to-file (build-path 'same "index.html")
|
||||
(lambda () (display new))
|
||||
#:mode 'text
|
||||
#:exists 'replace)
|
||||
(define (do-file path)
|
||||
(define old (file->string path))
|
||||
(define new (regexp-replace </head> old subst))
|
||||
(with-output-to-file path
|
||||
(lambda () (display new))
|
||||
#:mode 'text
|
||||
#:exists 'replace))
|
||||
|
||||
(for ([path (find-files (lambda (path)
|
||||
(regexp-match? #rx"\\.html" path))
|
||||
(build-path 'same "index"))])
|
||||
(do-file path))
|
||||
|
|
363
index.html
363
index.html
File diff suppressed because one or more lines are too long
|
@ -1,2 +1,3 @@
|
|||
scribble --html ++style gh.css ++xref-in setup/xref load-collections-xref --redirect-main "http://docs.racket-lang.org/" main.rkt
|
||||
scribble --htmls ++style gh.css ++xref-in setup/xref load-collections-xref --redirect-main "http://docs.racket-lang.org/" index.rkt
|
||||
racket add-to-head.rkt
|
||||
cp index/ ./
|
||||
|
|
Loading…
Reference in New Issue
Block a user