Fork me on GitHub

About the site

The ledger-cli.org site is kept in the ledger-website repo (changes). It is static html generated from markdown by middleman. Commits will normally appear on ledger-cli.org immediately, otherwise on the hour.

Version-specific documentation, with urls beginning /3.0/ or /2.6/, comes from the ledger docs in the master and maint branches respectively.

There is also a wiki, that of the ledger repo on GitHub, with a convenient url alias: wiki.ledger-cli.org.

The site is built using Travis CI and deploys to an Amazon S3 bucket which is then served up with an Amazon CloudFront distribution.

We use this small Lambda@Edge function to serve redirects and to redirect bare domain to www:

'use strict';

exports.handler = (event, context, callback) => {
    const request = event.Records[0].cf.request;
    const host = request.headers.host[0].value;

    if (host == "www.ledger-cli.org") {
        callback(null, request);
    } else {
        var redirectTarget = 'https://www.ledger-cli.org';

        if (host == "git.ledger-cli.org") {
            redirectTarget = "https://github.com/ledger/ledger";
        } else if (host == "list.ledger-cli.org") {
            redirectTarget = "https://groups.google.com/group/ledger-cli";
        } else if (host == "wiki.ledger-cli.org") {
            redirectTarget = "https://github.com/ledger/ledger/wiki";
        }

        var response = { 
            status: '302',
            statusDescription: 'Found',
            headers: {
                location: [{
                    key: 'Location',
                    value: redirectTarget,
                }],
            },
        };

        callback(null, response);
    }
};

The current webmaster is Pete Keen. All help is welcome.