= asciidoctor.org image:https://secure.travis-ci.org/asciidoctor/asciidoctor.org.png?branch=master[“Build Status”, link=”https://travis-ci.org/asciidoctor/asciidoctor.org”]
Project site for http://asciidoctor.org[Asciidoctor], composed in AsciiDoc, styled by Foundation, baked with Awestruct and published by Travis CI.
For instructions on how to install Awestruct and its dependencies, refer to the section xref:install-awestruct[Install Awestruct] below.
== Preview the site locally
To preview the site locally, simply run the default rake build task:
The default rake build task is +preview+, so you’re effectively typing:
The +preview+ task is just a short way of invoking Awestruct in development mode directly:
Now visit http://localhost:4242 to preview the site.
To rebuild the site from a clean state, pass the +–force+ flag to the +preview+ task:
You can pass any flag through to Awestruct using the syntax in the previous command.
If you just want to generate the site, run:
. install a node.js package or . set the following environment variable in your shell profile scripts (e.g., +~/.bash_profile+):
export EXECJS_RUNTIME=SpiderMonkey ////
== Add and commit files
Add new files (such as a new blog entry or image):
git add news/news-slug.adoc
or all new files present in a directory (it only affects new files, skips files already committed)
git add news/
Commit all files marked to be committed, including new files that were just added:
git commit -m ‘your message here’
Commit all files that have changed, even if not marked to be committed:
git commit -a -m ‘your message here’
Make sure there are no files that are “untracked” or “modified”:
You should see:
nothing to commit (working directory clean)
Now you are ready to deploy.
== Deploy the site to GitHub Pages
The following commands will push changes (+git push+), clean build the site (+–force -g+) using the production profile (+-P production+), then deploy it to github pages (+–deploy+):
git push awestruct -P production –force -g –deploy
Or simply run the prepared rake build task (to deploy locally):
Or just push and let https://travis-ci.org/asciidoctor/asciidoctor.org[Travis CI] do the work of deploying the site:
If you want to push without triggering a publish, add the following to the commit message:
== Install Awestruct
First, install http://rvm.io[RVM]. Trust me on this.
$ curl -#L https://get.rvm.io | bash -s stable –ruby
Next, setup an RVM gemset for working with the Asciidoctor site:
$ rvm use [email protected] –create
At this point, you could install Awestruct directly, but since the site build has some additional dependencies, it’s best to let bundler handle the installation. Bundler will also ensure that you are using the correct versions of each gem when you run Awestruct.
$ bundle install
You’re now Awestruct!
== DNS records
The site runs on the domain name asciidoctor.org, which is specified in the CNAME file. The GitHub server automatically sets up redirects that point from www.asciidoctor.org to asciidoctor.org.
See the following help page for more details: https://help.github.com/articles/setting-up-a-custom-domain-with-github-pages