areguera / centos / centos.org

Forked from centos/centos.org 4 years ago
Clone

Blame README.md

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
```
4f7719
sudo docker pull registry.centos.org/arrfab/nanoc:latest # Download the container
4f7719
sudo docker run --rm -v /opt/data/git/centos.org/:/nanoc/:Z registry.centos.org/arrfab/nanoc:latest
fdc62c
```
4f7719
Please note that it also works with Podman, so no need to install Docker anymore ! :
4f7719
4f7719
```
4f7719
sudo yum install -y podman
aa77f5
podman run --rm -v /opt/data/git/centos.org/:/nanoc/:Z registry.centos.org/arrfab/nanoc:latest
4f7719
```
4f7719
aa77f5
## View the output
aa77f5
You can just use python http server to view the locally rendered site, before pushing to httpd node.
aa77f5
For this you can just use something like this : 
aa77f5
```
aa77f5
cd /opt/data/git/centos.org
aa77f5
which python3 >/dev/null && python3 -m http.server 9000 || python -mSimpleHTTPServer 9000
aa77f5
aa77f5
```
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