Glan (Irish for "clean", pronounced /glawn/) is an extremely simple way to build a very fast, secure web site.
Use it when you don't need the advanced features of a CMS such as Drupal or Wordpress.
- Extremely fast
- Totally secure against hacking
- Fully static, so can be served out of cheap cloud storage from Amazon or S3 (and optionally served through a CDN for worldwide speed)
- Markdown page authoring, so no HTML knowledge required
- Structured hierarchically
- Styled with Twitter Bootstrap
- Open source, so customizable and free forever (See LICENSE.md)
To modify an existing Glan web site. you will need to make changes as follows
- Edit the file web/site/config.json to set the title of the web site and other properties.
- Replace the image web/site/logo.png with your logo
- Edit the file web/site/footer.txt to set the text that goes on the bottom of each page.
- Edit the file web/site/structure.json to specify all the pages in your web site and how they are arranged hierarchically.
- For every entry in the
structure.json
add a.txt
file in Markdown format in web/site/pages/. For example web/site/pages/home.txt is the home page. - Specify rotating images in web/site/rotimg/
The following instructions assume you are using a Linux machine, and will mosly be valid also on a Mac. If you have a Windows machine, you will probably want to install Cygwin to get a Unix-like command line.
Download or fork from https://github.com/eobrain/glan
[More instructions coming soon ...]
Prerequisites
- A Unix-like command line shell, such as on Linux, Mac, or Cygwin
make
, which is likely already installed on your Unix-like systems3cmd
for command-line copying to S3.python
for running a local test Web servercoffeescript
for generating JavaScript
On Ubuntu and similar Linux systems you can install necessary dependencies by doing
sudo apt-get install s3cmd coffeescript
Step-by step:
-
Create an Amazon AWS account if you don't already have one
-
In your browser go to the AWS console and go to the S3 area.
-
Create a bucket called, for example
www.mydomain.com
, and choose a region, for exampleus-west-1
-
In the Properties, enable Static Website Hosting and set the Index Document to
index.html
-
Open the
Makefile
file in a text editor and modify the following at the top of the file:- set the
BUCKET
variable to your S3 bucket name - set the
REGION
variable to the region of your bucket
- set the
-
Open a command-line shell and
cd
to your Glan directory -
If this is the first time using
s3cmd
with your AWS account in the current Glan installation, domake config
and enter in your Amazon S3 access key and secret key. You can probably accept all the other defaults if you are deploying what will become a public website, except choose "n" to save the configuration to the local file
s3.config
. (Be careful to secure this file because whoever has this file can overwrite your website.) -
Copy your dite to the bucket with
make deploy
-
In your browser view the URL printed out by the previous command, and verify that you can see your site
-
Now you have three choices:
- Use the above Amazon domain for your web site
- Use DNS to setup a CNAME entry pointing from a domain of your
own to the S3 domain. This must match the bucket name, so for
example if your bucket is
www.mydomain.com
you must add a CNAME entry forwww
to yourmydomain.com
domain, pointing tos3-_region_.amazonaws.com
- Set up a download Cloudfront distribution whose origin is the
above S3 bucket, with a CNAME of a subdomain whose DNS you
control, and with a default root object of
index.html
. Then configure your DNS CNAME to point to the created distribution domain.
To view your blog on your decelopment machine type
make server
This will start an HTTP server serving up your browser at http://localhost:4444