aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: de788927ced9e6743770b883cac8e4ec3d298188 (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
# NAWP (NAWP Ain't WordPress) -- Minimal Blogging Engine in Chicken Scheme

This is very much a work in progress, and not everything is guaranteed
to work just now.

NAWP stores content in an sqlite database.  It is dynamic, not a static
site generator.  It is supposed to run as a CGI script.

Here is a list of the external Scheme libraries ("eggs" in Chicken Scheme parlance) that NAWP needs:

* anaphora
* atom
* crypt
* lowdown
* matchable
* rfc3339
* sql-de-lite
* srfi-1
* srfi-13
* sxml-transforms
* uri-common

You'll also need a CGI-capable web server.  I use lighttpd with mod_cgi
enabled.

Once the dependencies are installed, run:
```csc nawp.scm```

Copy the resulting binary to your cgi-bin directory.

Next, make the database:
```sqlite3 /var/lib/nawp/blog.db < schema.sql```

Make it readable and writable by the user the CGI script will run as.

Add a new user.
Run the script as the owner of the DB, with the adduser argument.
For instance, to add a user named `chris`:

    doas -u dbowner /path/to/nawp adduser chris 'Chris Brannon'

You'll be prompted for the password.  Unfortunately it'll echo to stdout
for now.  Fixing that is going to require a little yak-shaving.
Finally, you'll want to do some web server configuration.  TODO.

## Contributing

To contribute, you can push to branches in this repository that have names
starting with `patch_`.    I borrowed this idea from Tim Vaughan, author
of `elpher` et al.  The difference is that Tim Vaughan uses the `git://`
protocol, where I use `https://`.

## Roadmap

I plan on adding an API.  It will probably be the metaweblog XML-RPC
API used by WordPress, or a slimmed-down version thereof.  There are
command-line tools for blogging with WordPress, and it would be nice to
be able to use those with NAWP.

I may add Gemini support.  I haven't quite decided how I feel about Gemini.
At first blush, it seems quite compelling and worth the effort.

I may add support for alternative input formats like asciidoc.
More likely, I'd consider replacing markdown with asciidoc and sticking
to one single input format.
Markdown is useful, but it is also poorly specified -- excepting CommonMark -- and underpowered.

Idle speculation: I wonder how hard it would be to add SXML as an output format to pandoc...