From aa77f56d1d2563c161f406b1a4114a8db125fb9c Mon Sep 17 00:00:00 2001 From: Fabian Arrotin Date: Oct 21 2019 12:30:01 +0000 Subject: Just added simple python snippet for local view - works also on c8 Signed-off-by: Fabian Arrotin --- diff --git a/README.md b/README.md index bd7de6b..3fcc24c 100644 --- a/README.md +++ b/README.md @@ -49,9 +49,17 @@ Please note that it also works with Podman, so no need to install Docker anymore ``` sudo yum install -y podman -sudo podman run --rm -v /opt/data/git/centos.org/:/nanoc/:Z registry.centos.org/arrfab/nanoc:latest +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 @@ -60,15 +68,3 @@ sudo podman run --rm -v /opt/data/git/centos.org/:/nanoc/:Z registry.centos.org/ * The /lib directory contains nanoc helper files used to process the site * Compiled site content exists in /output -#Building the site - * Run 'nanoc' to compile assemble the static site. files from /static, /content, and /layouts will be combined. - * You may view the site with 'nanoc view' and then pointing your browser at http://127.0.0.1:3000 - -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. -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. -Next run 'nanoc view &', followed by 'guard' -Now in another terminal, you may make changes to the website content, and it will rebuild as you touch files. - - -#Deploying the site -Simply run 'nanoc deploy --target=' where the target value is either prod1 or prod2. These targets are defined in the nanoc.yaml file.