Add a stub to generate a wiki template.

This commit is contained in:
Eli Barzilay 2010-10-26 07:18:13 -04:00
parent ed5033159a
commit 5f3718a24e
3 changed files with 20 additions and 3 deletions

View File

@ -14,7 +14,8 @@
("stubs/git" "http://git.racket-lang.org/" abs)
("stubs/blog" "http://blog.racket-lang.org/" abs)
("stubs/mailman" "http://lists.racket-lang.org/" abs)
("stubs/dirlist" "http://download.racket-lang.org/" abs)))
("stubs/dirlist" "http://download.racket-lang.org/" abs)
("stubs/wiki" "http://wiki.racket-lang.org/" abs)))
(provide distributions)
(define distributions

View File

@ -3,5 +3,6 @@
(provide planet)
(require "planet.rkt" "blog.rkt" ; these need to be copied to the service
"pre.rkt" "git.rkt"
"mailman.rkt" "dirlist.rkt") ; these are used on the server directly
"pre.rkt" "git.rkt" ; / these are used on the
"mailman.rkt" "dirlist.rkt" ; \ server directly
"wiki.rkt")

View File

@ -0,0 +1,15 @@
#lang at-exp s-exp "../common.rkt"
(require (prefix-in www: (only-in "../www/shared.rkt" the-resources)))
(define-context "stubs/wiki" #:resources www:the-resources)
(define header+footer
(delay (regexp-split #rx"{{{BODY}}}"
(xml->string @page[#:id 'browse-downloads
#:html-only #t
#:part-of 'download
"{{{BODY}}}"]))))
(define template
@page[#:title "{{{TITLE}}}" "{{{BODY}}}"])