carlwgeorge / centos / centos.org

Forked from centos/centos.org 3 years ago
Clone
Blob Blame History Raw

The site is built with *nanoc* and *Bootstrap 3*.

  * http://www.nanoc.ws
  * http://getbootstrap.com

We use haml for templates where it makes sense and mostly markdown for
content.


Required Gems:

  * nanoc
  * cri
  * compass
  * haml
  * nokogiri // available from Fedora (EPEL?) repository
  * kramdown 
  * pry
  * rainpress
  * rubypants
  * sass
  * susy
  * systemu
  * asciidoc // also requires the asciidoc package
  * adsf // if using 'nanoc view' command

May be in RPM:

  * ruby
  * asciidoc
  * nokogiri

## Installing on CentOS 7 as well as F19/20/21:

<pre>
sudo yum install ruby asciidoc rubygem-bundler make gcc ruby-devel zlib-devel zlib gcc-c++
bundle install
</pre>


## Using a built container (all platforms):
Assuming that you have this git repository cloned under /opt/data/git/centos.org : 
```
sudo docker pull registry.centos.org/arrfab/nanoc:latest # Download the container
sudo docker run --rm -v /opt/data/git/centos.org/:/nanoc/:Z registry.centos.org/arrfab/nanoc:latest
```
Please note that it also works with Podman, so no need to install Docker anymore ! :

```
sudo yum install -y podman
podman run --rm -v /opt/data/git/centos.org/:/nanoc/:Z registry.centos.org/arrfab/nanoc:latest
```

## View the output
You can just use python http server to view the locally rendered site, before pushing to httpd node.
For this you can just use something like this : 
```
cd /opt/data/git/centos.org
which python3 >/dev/null && python3 -m http.server 9000 || python -mSimpleHTTPServer 9000

```

#Site Layout
  * Template and menu files live in /layouts
  * Markdown, erb and processed text files live in /content
  * Static site content such as images and javascript live in /static
  * The /lib directory contains nanoc helper files used to process the site
  * Compiled site content exists in /output