Configuring a Blog with Supporting Source Pages

This article aims to show you how to configure and create your own blog (w/ sources) either in HTML for viewing on your local computer, or as a database that you can deploy online (or both).

Unlike a standalone blog, the following configuration will show you how to setup a blog that includes sources. Such a blog can be used by genealogists for making proof arguments, and by non-genalogists to provide footnotes in their blog posts. Unfortunately, I no longer have a working demo, but you can use this configuration to create your own

Running Gigatrees

Building a blog is as easy as running one of the following commands. The configuration files listed in the commands can be found described below. You can simply copy and paste those configurations into similarily named text files and place them in the same folder as the application.

The build a blog in HTML

gigatrees5.exe -c config.xml

To create a database of your blog

gigatrees5.exe -c config.xml -c db.xml

Website Configuration

In order to configure a blog, whether doing so for HTML or a database, the first thing to do is load the gigatrees plugin and the default theme and enable copying of the plugin files to the output folder. Next, in the default theme, $HOME_LINK$ is setup to link to the home page. However, when building standalone reports, the home page is not created, so I overrode that placeholder as shown. If you're building a database, you can simply remove the word "index". This is because the database does not support filenames of "index". Next, I setup the website metadata. You should, of course, add your website's title and any other items that you wish to include, such as the site owner's name, the site description, banner and favicon. Since my visitors have no need to access the source index page directly, I hid the sidebar menu by including the hide.sidebar.css stylesheet (found in the gigatrees plugin folder) for a cleaner look. I also loaded the dynamic.font.size.css stylesheet for a better viewing experience. I also added some styling to hide the source index page claim count, which will always be 0, as no individual events will be processed. Next, I added my GEDCOM filename and output folder. I also enable only those <Pages> I wanted to create. Since this demonstration is for a blog pages and its associated source pages, those are the only two enabled below. Since profile pages are disabled, individual's record ids numbers will be shown preceding their name. I hid these under the miscellaneous option, for a cleaner look. I also hid all unused sources, both to keep the number of files created/database size, small, and to ensure that I did not include something unintended.

config.xml

<Gigatrees>
  <Plugins>
    <Plugin> plugins\gigatrees         </Plugin>
    <Plugin> plugins\theme.a           </Plugin>
	
    <CopyPlugins> true </CopyPlugins>
  </Plugins>
	
  <Placeholders>
    <Placeholder> <Name> $HOME_LINK$ </Name> <Content> <![CDATA[ %RootPath%/blog/index%Extension% ]]> </Content> </Placeholder>  
  </Placeholders>

  <Setup>
    <SiteTitle>       Greybeard's Ghosts </SiteTitle>
    <SiteOwner>       ...                </SiteOwner>
    <SiteDescription> ...                </SiteDescription>
    <SiteBanner>      ...                </SiteBanner>
	
    <Favicon>         %PluginsURL%gigatrees/imgs/favicon.png </Favicon>
	
    <DropHeader><![CDATA[ <link href="%PluginsURL%gigatrees/hide.sidebar.css" rel="stylesheet" /> ]]></DropHeader>
    <DropHeader><![CDATA[ <link href="%PluginsURL%gigatrees/dynamic.font.size.css" rel="stylesheet" /> ]]></DropHeader>
    <DropStyles><![CDATA[ .gt-scl {display:none;} ]]></DropStyles> 
  </Setup>
 
  <Main>
    <GedcomFile> family.ged </GedcomFile>
    <OutputPath> web        </OutputPath>
  </Main>  
  
  <Pages>
    <Tree>         false </Tree>
    <Names>        false </Names>
    <Profiles>     false </Profiles>
    <Sources>       true </Sources>
    <Blog>          true </Blog>
    <Places>       false </Places>
    <Ancestors>    false </Ancestors>
    <DNAAncestors> false </DNAAncestors>
    <DNARelatives> false </DNARelatives>
    <Kinships>     false </Kinships>
    <Census>       false </Census>
    <Descendants>  false </Descendants>
    <Collections>  false </Collections>
    <Photos>       false </Photos>
    <Gallery>      false </Gallery>
    <Validation>   false </Validation>
    <Updates>      false </Updates>
  </Pages>

  <Misc>
    <HideRecordIds>     true </HideRecordIds>
    <HideUnusedSources> true </HideUnusedSources>
  </Misc>  
</Gigatrees>

If I was setting up this blog for HTML, I'd be done. Easy-peasy. But since I am building a database for hosting online, I needed to configure it first.

Database

If you want to publish your blog online, you will need to create a database. This will require a few additional steps. If you already have plugins installed on your server, you may want set the <CopyPlugins> option to false. I install all my plugins at the root level, so that I do not need to have multiple sets for each demo. Next, define some placeholders to simplify the setup. You will need to set your /super/secret/server/path to match that provided to you by your hosting service and fill in your domain, database-name and your database extension (i.e. db, sqlite, etc.). The domain name must always point to the root domain. Next, the setup assumes you are going to install your census table into a subfolder of your root domain that has the same name as your database. You can change the folder name here if you like, or remove the <RootPath> if installing at the root domain. This setup also assumes that your plugins are installed at the root level (like mine). If you are putting them into your subfolder, don't disable copying of plugins, and clear the <PluginsURL> option to use the default setting. The next step is to enable the database. You should not need to make any changes here as it uses the placeholders you setup prior. Lastly, anytime you are publishing your website online, you should enable the privatization <Security> setting and hide living individuals. This will obsfucate their names and strip sensitive data as well as other information you may have flagged as private.

db.xml

<Gigatrees>
  <Plugins>
    <CopyPlugins> false </CopyPlugins>
  </Plugins>  
  
  <Placeholders>
    <Placeholder> <Name> $SERVER$    </Name> <Content> /super/secret/server/path </Content> </Placeholder>
    <Placeholder> <Name> $DOMAIN$    </Name> <Content> https://domain.com        </Content> </Placeholder>
    <Placeholder> <Name> $SITE$      </Name> <Content> database-name             </Content> </Placeholder>
    <Placeholder> <Name> $DATABASE$  </Name> <Content> $SITE$.ext                </Content> </Placeholder>
  </Placeholders>
 
  <Setup>
    <Domain>      $DOMAIN$  </Domain>
    <RootPath>    /$SITE$   </RootPath>
    <PluginsURL> 	/plugins/ </PluginsURL>
  </Setup>	
  
  <Database>
    <EnableServerDatabase> true          </EnableServerDatabase>
    <LocalDatabasePath>    %OutputPath%  </LocalDatabasePath>
    <ServerDatabasePath>   $SERVER$      </ServerDatabasePath> 
    <ServerDatabaseName>   $DATABASE$    </ServerDatabaseName>
  </Database>  
  
  <Security>
    <Privatize>  true </Privatize>
    <HideLiving> true </HideLiving>
  </Security>  
</Gigatrees>

Whenever your building a database for deployment, you need to deploy it. See the Quick Start Guide for simple instructions on doing so. Whether building for HTML or a database, these instructions should get you started building a blog with associated sources.

Comments