about summary refs log tree commit diff stats
path: root/README.md
blob: 96b23cee1a94abdbc6d48c9be9ccdd0c9d35e321 (plain)
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
# shite
## what it says on the tin

`shite` shits out a site using posix `sh`, `awk`, and `cp`---that's it.
Of course, it is shite.  But it'll make a site.

## use

make a site directory somewhere on your system and fill it with HTML files.
these can be just the body parts of these files---they will be enclosed with a
template, which is discussed below.  you can also ignore enclosing paragraphs
with `<p>` tags---paragraphs not starting with `<` will automatically be
enclosed with them.

when you run `shite`, it will collect all HTML files, run them through various
templates, and shit them out into the `out/` directory in the site directory.
each page will be sent through `.template.html` and into `out/PAGE/index.html`,
where `PAGE` is the filename without `.html`.  Then they'll be collected into an
index using `.index.html`, and into an RSS 2.0 feed using `.feed.xml`.

`.template.html`, `index.html`, and `.feed.xml` are treated as sh `heredocs`.
that is, any `$variable`, `$(function)`, or the like will be expanded.  `title`,
`body`, and `pubdate` are provided for convenience; you can define others in
`.shite.sh`.  a very simple template could look like this:

```
<!DOCTYPE html>
<title>$(title)</title>
$(body)
```

every other file in the site directory---that is, any file or directory that
isn't an HTML or XML file---will be copied to `out/` recursively, so go nuts!

### installation

```
# make install
```

### invocation

invoking `shite` is simple:

```
$ shite [-d DOMAIN] [-C DIRECTORY]
```

`DOMAIN` is your site's domain for the feed generator; the default is
the name of the site directory.  `DIRECTORY` will change the directory before
generating a site, so you can run `shite` from anywhere.

## license

Copyright (C) 2022 c. Duckworth and licensed under the Good Choices License.
See COPYING for details.

## contributing

Send me an [email](mailto:shite+git@me.acdw) with comments, complaints, and
merge requests.  if you want.

## testimonials

> oh dang that is fancy
~ m455

> hehe, nah it's shite
~ acdw