This website is built on Middleman, a static site generator. See instructions below for building it.
The recommended way to test the site is with atomic.app. Currently, version 0.4.2 or later is required.
The first time you run it with Atomic App, you'll need to generate an answers.conf file with information it needs to launch the container. You shouldn't have to do this on successive runs unless you delete the answers.conf file for some reason.
-
Generate answer.conf file:
cd /path/to/atomic-site/Nulecule/ atomicapp genanswers .
-
Edit answers.conf to match your setup.
For answers.conf, the two things you are required to set is the full path
to the two directories, /source and /data. These should point to the absolute path to atomic-site/source
and atomic-site/data
directories on your computer. For example: /home/josh/git/atomic-site/source
.
The other fields should not require modification for most people.
Once you are done with the setup, you should be able to do this to run the container each time and test the atomic site by running from the repository's root:
cd /path/to/atomic-site/
sudo atomicapp run Nulecule/
The first time you do this, it will pull the atomic-site image, which may take a while depending on your internet connection. After that it should be very fast.
Once it's running, you can view the site on 127.0.0.1:4567.
The second way to build the site is using Docker without atomic.app. From the repo's root directory, run the docker build:
./docker.sh
If your local machine has Docker secured, then you'll need to sudo the above command.
This will build the container image middleman
and then run it using
atomic run middleman
.
Once the container is up and running, the site will be available on 127.0.0.1:4567.
To restart the container at a later time, you can simply do atomic run middleman
or if
you'd like to rebuild the container, docker.sh
.
If you don't want to use the Atomic App or Docker containers for some reason, you can follow below instructions to build the site manually.
To get started, you need to have Ruby and Ruby Gems installed, as well as "bundler".
On a rpm based distribution:
git clone http://github.com/projectatomic/atomic-site.git
cd atomic-site
./setup.sh # This script assumes your user account has sudo rights
-
Start a local Middleman server:
./run-server.sh
This will update your locally installed gems and start a Middleman development server.
-
Next, browse to http://0.0.0.0:4567
-
Edit!
Note, when you edit files (pages, layouts, CSS, etc.), the site will dynamically update in development mode. (There's no need to refresh the page, unless you get a Ruby error.)
When there are new gems in Gemfile
, just run bundle
again.
The site can be customized by editing data/site.yml
.
To add a post to the community blog (or any blog managed by Middleman) use:
bundle exec middleman article TITLE
You can build the static site by running:
bundle exec middleman build
FIXME: Right now, please reference data/site.yml
After copying your public key to the remote server and configuring your site in data/site.yml, deployment is one command:
bundle exec middleman deploy
Simply add a new gem 'some-gem-here'
line in the Gemfile
and run
bundle install
For more information, please check the excellent Middleman documentation.