unhandledexception.net

Spiro's personal blog.

Definition Options

Page updated Sat Jan 11 2020 01:08:28 AM -08:00

The definition XML file contains the options that can be toggled to build a custom web site:

The following is a walkthrough of the options:

XML Line Description
<?xml version="1.0" encoding="utf-8" ?>
<WebCmsDefinition>
<ContentRootDir>MySite\ContentRoot</ContentRootDir> This is the root diretory of the source files that make up the web site. This is where you will put your content.
<OutputDir>MySite\Output</OutputDir> This is the output directory of your web site. This is where you will find your generated web site when you run the tool.
<IndexName>index</IndexName> This is the name of the file that will translate to index.html. Its content will be appended to the section, file, gallery and page listings. Do not add the extension, the tool looks for supported document types and will find the right one.
<DefaultDocument>index.html</DefaultDocument> This is the name of the index file that will be output, usually the web server supports index.html, but some servers will do Default.html instead.
<TemplateHtml>MySite\Template.html</TemplateHtml> The location of the HTML template file. This is the file that will serve as template for your pages.
<TemplateHtmlBodyPlaceholder>ContentBody</TemplateHtmlBodyPlaceholder> This is the text in the template html file that will be replaced by the pages's content.
<TemplateHtmlTitlePlaceholder>ContentTitle</TemplateHtmlTitlePlaceholder> This is the text in the template that gets replaced with the page title.
<TemplateHtmlNavigationPlaceholder>Navigation</TemplateHtmlNavigationPlaceholder> This is the text in the template that gets replaced with the navigation.
<TemplateFiles>Template.html</TemplateFiles> This specifies the HTML file to use as template
<TemplateHtmlUpdateTimePlaceholder>00/00/00 00:00:00</TemplateHtmlUpdateTimePlaceholder> This is the text in the template that gets replaced with the site last update time.
<HomePageTitle>Home</HomePageTitle> This is the title tat gets given too the home page. The other items are given their corresponding file/folder names
<Attributes>
<DefinitionAttributes>
Page-specific attributes
<RelativePath>Blog\index.html</RelativePath> The relative (final) path the attributes get applied to, for example, this applies to the Blog listing
<Attributes>pagelist-sort-created-desc;pagelist-showcreated</Attributes> Token attributes, semicolon-separated that alter behavior. In this case, we want to sort by reverse created date (newest on top) and display the creaded date on the list.
<CustomTemplate>MySite\TemplateG.html</CustomTemplate> This forces a different template to be applied to the page.
</DefinitionAttributes>
</Attributes>
<HiddenPageList>XXX\index.html;Drop\index.html</HiddenPageList> This is a list of pages we don't want to show in navigation, secret!
<SkipThumbnailGenIfExists>true</SkipThumbnailGenIfExists> Skip thumbnail creation if thumbnails exist, saves time.
<SkipResourceCopyIfExists>true</SkipResourceCopyIfExists> Skip copying files if they exist. Saves time.
<ShowPagesInNav>true</ShowPagesInNav> Allows showing pages in addition to directories in the navigation. Allows more direct navigation, BUT can get crowded if you have a lot of pages.
</WebCmsDefinition>