Next: , Previous: , Up: Programming Interface   [Contents][Index]


5.4 Pages

(use-modules (haunt page))

Page objects represent files that have yet to be written to disk. Their contents may be any arbitrary object that their writer procedure knows how to serialize. In practice, pages are almost always written to disk as HTML or XML.

Scheme Procedure: make-page file-name contents writer

Create a new page object. The string file-name specifies where the page should be written to in the file system. The procedure writer is responsible for serializing contents.

Scheme Procedure: page? object

Return #t if object is a page object.

Scheme Procedure: page-file-name page

Return the file name string for page.

Scheme Procedure: page-contents page

Return the contents of page.

Scheme Procedure: page-writer page

Return the writer procedure page.

Scheme Procedure: write-page page output-directory

Write page to output-directory.