A static site generator (being rebuilt)
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
logo Updated rasterized logo to match vector source. Sep 29, 2014
skeleton chore(bootstrap): Upgrade Bootstrap to v3.3.7 Feb 11, 2018
tools ssg-structure.sh: added quotes where needed. Feb 16, 2015
.gitignore README formatting, example code style, FAQ link. Jul 19, 2014
.travis.yml Travis CI: Use container-based infrastructure Aug 18, 2015
LICENSE Update copyright Jan 26, 2017
README.md chore(bootstrap): Upgrade Bootstrap to v3.3.7 Feb 11, 2018
VERSION Specify defaults for page variables in website.conf. Jul 30, 2014
screenshot.png Breaking: 'img-procs.tcl' -> 'img.tcl'. RSS links. Jan 16, 2015
ssg.cmd Windows and OS X support. Jul 17, 2014
ssg.tcl docs(*): Update Tcler's Wiki URL Nov 17, 2017
tests.tcl Update copyright Jan 26, 2017



Build Status

Tclssg is a static site generator with template support written in Tcl for dbohdan.com. It is intended to make it easy to manage a small to medium-sized personal website with an optional blog, "small to medium-sized" meaning one with under about 2000 pages. Tclssg uses Markdown for content formatting, Bootstrap 3 for layout (with Bootstrap theme support) and Tcl code embedded in HTML for templating.


  • Markdown, Bootstrap themes, Tcl code for templates;
  • Plain old pages and blog posts [1];
  • RSS feeds;
  • SEO and usability features out of the box: site maps, canonical and previous/next links, noindex on collection pages.
  • Valid HTML5 and CSS level 3 output;
  • Deployment over FTP;
  • Deployment over SCP or other protocols with a custom deployment command;
  • Support for external comment engines (currently: Disqus);
  • Relative links in the HTML output by default that make it suitable for viewing over file://;
  • Reasonably fast;
  • Few dependencies. Experimental self-contained binaries are available for Linux, Windows and Mac.

1. A blog post differs from a plain old page in that it has a sidebar with links to other blog posts sorted by recency and tags. The latest blog posts are featured on the blog index and tag pages are generated to collect blog posts with the same tag.

Page screenshot

A test page generated by Tclssg

Getting started

Tclssg is known to run on Linux, FreeBSD, OpenBSD, NetBSD, OS X and Windows 2000/XP/7/8.x.

To use it you will need Tcl 8.5 or newer, Tcllib and SQLite version 3 bindings for Tcl installed.

To install those on Debian or Ubuntu run the following command:

sudo apt-get install tcl tcllib libsqlite3-tcl

On Fedora, RHEL or CentOS:

su -
yum install tcl tcllib sqlite-tcl

On Windows the easiest option is to install ActiveTcl from ActiveState. The copy of Tcl that comes with Git for Windows does not include Tcllib or an SQLite 3 module, so it will not run Tclssg out of the box. After installing ActiveTcl run

c:\Tcl\bin\teacup.exe install html
c:\Tcl\bin\teacup.exe install json

On OS X use MacPorts or install ActiveTcl for Mac. With MacPorts:

sudo port install tcllib tcl-sqlite3

Once you have the dependencies installed clone this repository, cd into it then run

chmod +x ssg.tcl
./ssg.tcl init
./ssg.tcl build --local
./ssg.tcl serve --browse

or on Windows

ssg.cmd init
ssg.cmd build --local
ssg.cmd serve --browse

This will create a new website project in the directory website/input based on the default project skeleton, build the website in website/output and open the result in your web browser.


Write Markdown and use <!-- more --> to designate the break between the teaser (the part of the article shown on the blog index and on tag pages) and the rest of the content. Use page settings to customize the page's output. Example:

    title {Test page}
    blogPost 1
    tags {test {a long tag with spaces}}
    date 2014-01-02
    hideDate 1
**Lorem ipsum** reprehenderit _ullamco deserunt sit eiusmod_ ut minim in id
voluptate proident enim eu aliqua sit.

<!-- more -->

Mollit ex cillum pariatur anim [exemplum](http://example.com) tempor
exercitation sed eu Excepteur dolore deserunt cupidatat aliquip irure in
fugiat eu laborum est.

User's guide

For more information on how to use Tclssg read the User's guide on the project wiki.

Answers to frequently asked questions can be found on the FAQ page.


MIT. See the file LICENSE for details.

The Tclssg logo images are copyright (c) 2014 dbohdan and are licensed under CC BY 4.0.

The stackato-cli browse package is copyright (c) 2011-2012 ActiveState Software Inc. and is distributed under the Apache License, Version 2.0. See external/browse/license.txt.

The Caius Markdown package 1.0 is copyright (c) 2014 Caius Project and is distributed under the MIT license. See external/markdown/markdown.tcl.

Bootstrap 3.3.7 is copyright (c) 2011-2016 Twitter, Inc and is distributed under the MIT license. See skeleton/static/external/bootstrap-3.3.7-dist/LICENSE.