commit 7754485d073744257e905be00f3ddacfbdef81ed
parent de77525df15162fa3ed057469bbf53335cc6bbc1
Author: josuah <mail@josuah.net>
Date: Sun, 28 Aug 2016 15:20:30 +0200
www: Fixed
Diffstat:
5 files changed, 48 insertions(+), 18 deletions(-)
diff --git a/README b/README
@@ -1,7 +1,7 @@
http://josuah.net mail@josuah.net
- __ /\
- \/ ____ ____ __ /\ _____ / /_
- /\ / __ \ / __// / / /.'__ // __ \
+ __ /\
+ \/ ____ ____ __ /\ _____ / /_
+ /\ / __ \ / __// / / /.'__ // __ \
//////_///_\\\ ///_//////_////// ////
_,-' / \____/\___/ \____/ \____/ \/ \/ 's dotfiles
=\_,-'==========================================================================
@@ -86,5 +86,6 @@ PROJECTS
miniwi Tiny bitmap font http://github.com/josuah/miniwi
notes Biology notes http://github.com/josuah/notes
website Website source http://github.com/josuah/website
+ www Website build http://github.com/josuah/josuah.github.io
barkdown Not a text markup http://github.com/josuah/barkdown
vir Draft for an editor http://github.com/josuah/vir
diff --git a/bin/www b/bin/www
@@ -6,9 +6,39 @@
# \____/ \____/ \____/ - Static website generator
#===============================================================================
-OUT=".site"
-LAYOUT="layout.html"
-NL='
+LAYOUT="layout.html" OUT="$(pwd)/.site" NL='
+' help='
+NAME
+ www - static website generator
+
+USAGE
+ www [-o OUTPUT]
+
+DESCRIPTION
+ INPUT Source directory from which generate the website
+ OUTPUT Target directory for the generated website
+
+FILES
+ INPUT/layout.html
+ File containing the pages layout
+ INPUT/.output
+ Default OUTPUT directory
+ _* Any file starting by "_" will be ignored
+ README The README files content will be displayed on the listing pages
+
+FILE FORMAT
+ Within a layout.html, there is some templating features, using keywords.
+
+ {{ content }}
+ Content of README file in the current directory.
+ {{ list }}
+ List of subpages for the current directory.
+ {{ nav }}
+ List of top level directories, for use as a <nav> element.
+ {{ root }}
+ Relative path to the root of the website, for relative links.
+ {{ title }}
+ Page title, given by the path, with "/" replaced by " > ".
'
parse()
@@ -34,17 +64,16 @@ parse()
list()
{
- local IFS="$NL" stat format='<a href="%s">%-30s</a> %s\n'
-
- printf '<b>%-30s %-13s %-10s</b>\n' NAME SIZE EDIT
- for path in $(find "$1" -mindepth 1 -maxdepth 1 ! -name 'README')
- do
- stat="$(stat -c '%-13b %-10y' "$path")" stat="${stat%:*}"
- printf "$format" "${path#$1/}" "${path#$1/}" "${stat% *}"
+ find "$1" -mindepth 1 -maxdepth 1 ! -name 'README' | while read -r path
+ do printf '<a href="%s">%s</a>\n' "${path#$1/}" "${path#$1/}"
done
- unset IFS
}
+if [ "$1" = '-o' -a "$#" = 2 ]
+then OUT="$2"
+else printf '%s\n' "$help" && exit 0
+fi
+
# Generate navigation
IFS="$NL" nav='<a href=".."><<<</a>'
for dir in $(find . -mindepth 1 -maxdepth 1 -type d ! -path '*/.*')
diff --git a/shell/.profile b/shell/.profile
@@ -237,7 +237,7 @@ ghost_in_the_shell="\
coal="\
\033]P0000000 \033]P1ee3333 \033]P2ccee44 \033]P3ffcc55\
\033]P477aaaa \033]P5888888 \033]P655ee99 \033]P7cccccc\
-\033]P8666666 \033]P9ff6666 \033]PAeeff66 \033]PBffff99\
+\033]P8333333 \033]P9ff6666 \033]PAeeff66 \033]PBffff99\
\033]PCaaddff \033]PDaaaaaa \033]PE99ffbb \033]PFffffff"
if [ "$TERM" = 'linux' ]
diff --git a/st/config.h b/st/config.h
@@ -5,7 +5,7 @@
*
* font: see http://freedesktop.org/software/fontconfig/fontconfig-user.html
*/
-static char font[] = "mono:pixelsize=13:antialias=false";
+static char font[] = "mono:pixelsize=12:antialias=false";
static int borderpx = 2;
static char shell[] = "/bin/sh";
static char *utmp = NULL;
@@ -74,7 +74,7 @@ static const char *colorname[] = {
[7] = "#cccccc", /* white */
/* 8 bright colors */
- [8] = "#666666", /* grey */
+ [8] = "#333333", /* grey */
[9] = "#ff6666", /* red */
[10] = "#eeff66", /* green */
[11] = "#ffff99", /* yellow */
diff --git a/vim/.vimrc b/vim/.vimrc
@@ -13,7 +13,7 @@
set autoindent copyindent
" Text display
-set showmatch list listchars=tab:\|\ ,eol:$
+set showmatch list listchars=tab:>\ ,eol:$
" Interface
set ruler number colorcolumn=80