2 Web Publication

Following creation or update of the static content of a web page in Scrivener, the procedure for publishing the page to the web is as follows:

1. Compile a draft of the page selecting the MultiMarkdown -$>$ HTML option. Make sure that the page of interest (and only the page of interest) is selected for export.

2. Copy the generated XHTML to the appropriate directory in the development web site.

3. Edit the HTML file with Coda. Delete everything preceding the first $<$h1$>$ tag.

4. Delete the $<$/body$>$ and $<$/html$>$ tags at the end of the document.

5. Test the page locally.

6. If everything is good, publish the updated page to the production site. Otherwise, go back to Scrivener and correct the document, then repeat this procedure.

If we were a little more adept at declarative languages (i.e. XSL), we suspect that manual editing of the XHTML file (steps 3 and 4) would be unnecessary.

2.1 PHP Infrastructure Note

All pages on the web site are served as PHP. The typical scenario for static page publication is one or more static pages are housed in each directory. The directory also contains an “index.php” file that

1. Performs all necessary preliminary operations (e.g. session control, content negotiation, authentication, loading appropriate stylesheets and javascript.).

2. Displays the static xhtml content.

3. Performs all necessary clean up operations (e.g. displays the page footer, closes the page syntactically).

The PHP index file is created once, customized for the content page, and maintained with Coda. It rarely changes. As indicated above, modification of content is through Scrivener. The PHP infrastructure only changes when new pages, features, and facilities are added to the web site.