~ecs/wersh

wersh/example/index.html.w -rw-r--r-- 701 bytes
b5d8cd01Eyal Sawady Miscellaneous fixes 3 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
% # vim: set ft=markdown :
# wersh

Static site generation with POSIX shell scripts, loosely inspired by
[werc](http://werc.cat-v.org).

This page is a shell script: [example/index.html.sh](/index.html.sh). Files
ending with \*.sh are sourced and their stdout is written to the corresponding
output 'file'.

## Pages

Since it's a shell script, you can do pretty much anything you want. This list
of pages is dynamically generated:

% for page in $pages
% do
%   emit "* [$(page_title "$page")](${page%%.sh})"
% done

## Static content

Files that don't end in *.sh are automatically copied into the output
directory, like this one:

![](/images/mio.png)
% cp index.html.sh "$outputdir"/index.html.sh