#!/usr/bin/env zsh # # WebNomad, your slick and static website publisher # # Copyright (C) 2012-2013 Denis Roio # # This source code is free software; you can redistribute it and/or # modify it under the terms of the GNU Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This source code is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # Please refer to the GNU Public License for more details. # # You should have received a copy of the GNU Public License along with # this source code; if not, write to: # Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. QUIET=0 DEBUG=0 SYS=`dirname $0` source $SYS/utils act "Initializing Webnomad" act "Below is the log of files copied into this directory." act "Init does not rewrite any existing file" act mkdir -p views/js mkdir -p views/css touch views/css/custom.css { test -r views/index.html } || { cat < views/index.html

Hello world

Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

EOF } mkdir -p tmpl { test -r tmpl/header.html } || { cp -v ${SYS}/tmpl/header.html tmpl/ } { test -r tmpl/footer.html } || { cp -v ${SYS}/tmpl/footer.html tmpl/ } { test -r tmpl/navbar.html } || { cp -v ${SYS}/tmpl/navbar.html tmpl/ } { test -r config.zsh } || { cat < config.zsh TITLE="A new website made with WebNomad." DESCRIPTION="WebNomad, your slick and static website publisher, powered by HTML5, Zsh and Bootstrap" KEYWORDS="web, design, html" # # Anything below is safe to leave untouched # # What file extension to use for html files EXTENSION=".html" # What is the root of this website url, after the domain # leave blank if relative, or for instance /blog/ WEB_ROOT="" # What is the url for files in case indexing is used # this can be different from WEB_ROOT in order to serve # files from a position different from the web pages # FILES_ROOT="" # Uncomment for Flowtype # FLOWTYPE=1 # What is the size ratio of text with respect to the width # of its container element. This is better than setting the # text size in an absolute way (we use Flowtype) # FONT_RATIO=30 EOF } act notice "Initialization completed" act "Look in your new WebNomad project: $B $DIR $r" act "Customize $B config.zsh $r and then files in the $B tmpl/ $r folder" act "Create new HTML pages in $B views/ $r"