Skip to content

Instantly share code, notes, and snippets.

@vitalie
Last active October 9, 2015 10:28
Show Gist options
  • Save vitalie/3488913 to your computer and use it in GitHub Desktop.
Save vitalie/3488913 to your computer and use it in GitHub Desktop.
LuaDNS - GitHub Pages Configuration Example (Lua)
-- File: example.com.lua
-- Variable _a is replaced with zone name
-- _a = example.com
-- replace github-username with your username
github_pages(_a, "github-username")
function github_pages(domain, username)
-- Create CNAME for www.yourdomain.com pointing to user.github.com
cname(concat("www", domain), concat(username, "github.com"))
-- Create A records for root/naked domain (yourdomain.com)
a(domain, "204.232.175.78")
end
Copy link

ghost commented Jun 12, 2013

The github.com cname should now be github.io

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment