Kerouac middleware that generates a CNAME file for use with GitHub Pages.
Kerouac is open source software. Ongoing development is made possible by generous contributions from individuals and corporations. To learn more about how you can help keep this project financially sustainable, please visit Jared Hanson's page on Patreon.
$ npm install kerouac-cname
First, set the base url
setting for your site.
site.set('base url', 'http://www.example.com/');
Then declare a CNAME
page, using this middleware.
site.page('/CNAME', require('kerouac-cname')());
The generated output will include a /CNAME
resource, containing your site's
hostname. This can be used when hosting your site with GitHub Pages and using
a custom domain.
Copyright (c) 2017-2018 Jared Hanson <http://jaredhanson.net/>