Example Theme for Simplified Saaze: Vonhoff

· klm's blog


Original post is here: eklausmeier.goip.de

1. Features. Here is another theme called Vonhoff for Simplified Saaze. The example content is from Rolf Vonhoff, layout is a stripped-down version of this blog. Some key features:

  1. Lightweight as there are no gimmicks, no social media icons, no categories+tags, no dark theme switcher
  2. Simple navigation with only two options: a blog menu, and an about menu
  3. Input in Markdown, MathJax can be used, if required

The original homepage of Dr. Rolf Vonhoff has the following disadvantages:

  1. No https, though, encryption was rarely used in 2001 for non-sensitive websites
  2. Generated by FrontPage leading to various W3C validation errors
  3. Looking "old": mainly due to its use of iframe and lacking max-width setting

I downloaded the raw seven HTML files via curl. I wrote a special Perl script blogvonhoff to convert the raw HTML to Markdown. Nevertheless even the Perl converted files needed some hand-massaging. In particular the article "Expansion Theorem" was converted totally manually. Unfortunately, many links in the original website do no longer reference actual relevant content, they are orphaned. These outdated links were not corrected.

Git repository is here: saaze-vonhoff.

2. Installation. Check your PHP version with php -v. Install Composer, if you have not already done so. Then run:

1composer create-project eklausme/saaze-vonhoff

This will create a directory named saaze-vonhoff. This contains the theme, it will also contain Simplified Saaze. Though, you also need to install the following for Simplified Saaze:

  1. PHP Yaml extension, e.g., via trizen php-yaml
  2. Compile php_md4c_toHtml.c

See Installation. For MS Windows specific installation instructions see Installing Simplified Saaze on Windows 10 and Installing Simplified Saaze on Windows 10 #2.

3. Generating HTML. Once everything is installed, change to the directory and run Simplified Saaze:

1cd .../saaze-vonhoff
2php saaze

This will create a directory called build, which contains all generated HTML files.

4. Deployment. Here is a "deploy"-script to actually copy all HTML files and images to a webserver directory, /srv/http/vonhoff in this case. Actually, it is not a copy but a simple "move". Below script also assumes that the build directory is in /tmp/build. It can be anywhere.

 1#!/bin/bash
 2export SAAZEROOT=/home/klm/php/saaze-vonhoff
 3DOCROOT=/srv/http/vonhoff
 4
 5errorExit() {
 6	echo $1
 7	exit 1
 8}
 9
10[ -d $DOCROOT ] && rm -rf $DOCROOT
11[ -d /tmp/build ] || errorExit "No build directory in /tmp"
12mv /tmp/build $DOCROOT
13
14cd $DOCROOT
15ln -s $SAAZEROOT/public/img

This script might use lftp or scp to copy HTML files, if your webserver is on another machine. In above script the build was placed in /tmp by using php saaze -b /tmp/build.

The blog looks something like this: