carlwgeorge / centos / centos.org

Forked from centos/centos.org 3 years ago
Clone
e8ec7a
e94fa4
The site is built with *nanoc* and *Bootstrap 3*.
e94fa4
e94fa4
  * http://www.nanoc.ws
e94fa4
  * http://getbootstrap.com
e94fa4
e94fa4
We use haml for templates where it makes sense and mostly markdown for
e94fa4
content.
e94fa4
e94fa4
e94fa4
Required Gems:
e94fa4
e94fa4
  * nanoc
e94fa4
  * cri
e94fa4
  * compass
e94fa4
  * haml
e94fa4
  * nokogiri // available from Fedora (EPEL?) repository
e94fa4
  * kramdown 
e94fa4
  * pry
e94fa4
  * rainpress
e94fa4
  * rubypants
e94fa4
  * sass
e94fa4
  * susy
e94fa4
  * systemu
e94fa4
  * asciidoc // also requires the asciidoc package
e94fa4
  * adsf // if using 'nanoc view' command
e94fa4
e94fa4
May be in RPM:
e94fa4
e94fa4
  * ruby
e94fa4
  * asciidoc
e94fa4
  * nokogiri
e94fa4
fdc62c
## Installing on CentOS 7 as well as F19/20/21:
e8ec7a
e94fa4
1e5375
sudo yum install ruby asciidoc rubygem-bundler make gcc ruby-devel zlib-devel zlib gcc-c++
ce0219
bundle install
e94fa4
7f616c
fdc62c
fdc62c
## Using a built container (all platforms):
fdc62c
Assuming that you have this git repository cloned under /opt/data/git/centos.org : 
fdc62c
```
fdc62c
docker pull registry.centos.org/arrfab/nanoc:latest # Download the container
fdc62c
docker run --rm -v /opt/data/git/centos.org/:/nanoc/:Z registry.centos.org/arrfab/nanoc:latest
fdc62c
```
fdc62c
7f616c
#Site Layout
7f616c
  * Template and menu files live in /layouts
7f616c
  * Markdown, erb and processed text files live in /content
7f616c
  * Static site content such as images and javascript live in /static
7f616c
  * The /lib directory contains nanoc helper files used to process the site
7f616c
  * Compiled site content exists in /output
7f616c
7f616c
#Building the site
7f616c
  * Run 'nanoc' to compile assemble the static site. files from /static, /content, and /layouts will be combined.
7f616c
  * You may view the site with 'nanoc view' and then pointing your browser at http://127.0.0.1:3000
7f616c
7f616c
You may compile and view the site live as you make changes using the guard module. To do this, run 'guard init' at the root of the site. 
7f616c
This will create a watch file that will serve as list for what files the guard module will keep an eye on. Changes to these files will trigger an automatic rebuild of the site.
7f616c
Next run 'nanoc view &', followed by 'guard'
7f616c
Now in another terminal, you may make changes to the website content, and it will rebuild as you touch files. 
7f616c
7f616c
7f616c
#Deploying the site
7f616c
Simply run 'nanoc deploy --target=' where the target value is either prod1 or prod2. These targets are defined in the nanoc.yaml file.