site.scm -------- (define-reader ".md" markdown->sxml) (define-renderer my-renderer) (define-dynamic-pages "(.*)\.dynamic\.md" "\1") (define-dynamic-pages "(.*)\.dyn\.([^.]*)" "\1" dyn-reader) (define-page "index" '(contents . (ul (li "Photos") (li "Essays") (li "About me")) ) another-renderer) (define-page "photos" (part "photos.part.md") ) (define-page "about-me" `(contents . `(,(part #f "bio.part.md") ,(part #f "contact-details.part.md")))) (define (dyn-reader filename) ; maybe write something that reads the first line as a list of attribs and then ; reads body from the rest of the file, similar to how the existing hyde pages ; work. (with-input-from-file filename markdown->sxml)) (define (my-renderer defaults-alist page-alist) ; return some sxml ) (define (another-renderer defaults-alist page-alist) ; return some sxml ) photos.part.md -------------- Welcome to my photos page! Here are a list of the galleries I have made: + Chicken Conf + Roast chicken + Ate chicken -------------------------------------------------------------------------------- (part ) -> `(contents . ) (part 'navigation ) -> `(navigation . ) (part #f ) -> '() renderer) reader should produce an alist. For each occurance of define-page in site.scm we create the page named in the first argument. These later pages override pages defined earlier with the same name, but we should probably throw some kind of warning and give the option to throw an error. With: (define-page name-in-out/ alist renderer) alist can either be an alist or something that evaluates to one. For example, (part ) would try to read with a reader that was chosen based on the file extension. Once we've got a list of maps from output-pages to alists and renderers we call the renderer on each member of the list in turn in order to generate the final page. Glossary -------- Output Site The contents of the out/ directory. out/ Produced as a result of running the program. Page A page corresponds to a *file* in the Output Site. i.e. something that occupies a URL when the out/ directory is placed on a webserver.