diff --git a/example/README b/example/README new file mode 100644 index 0000000..13a54f5 --- /dev/null +++ b/example/README @@ -0,0 +1,2 @@ +This is a blog site. Ideally you wouldn't use any relative path names, but for +portability reasons I'm assuming that swebs is being run in this directory. diff --git a/example/run.sh b/example/run.sh new file mode 100755 index 0000000..2969e78 --- /dev/null +++ b/example/run.sh @@ -0,0 +1,3 @@ +#!/bin/sh + +swebs -s sitefile -o logs -p 8000 diff --git a/example/site/blog/README b/example/site/blog/README new file mode 100644 index 0000000..4696f6b --- /dev/null +++ b/example/site/blog/README @@ -0,0 +1,11 @@ +If the user requests + +/blog/2021-1-25 + +because the sitefile says + +site/blog/ + +these 2 strings are appended into + +site/blog//blog/2021-1-25 diff --git a/example/site/blog/blog/2021-1-25.html b/example/site/blog/blog/2021-1-25.html new file mode 100644 index 0000000..cbbdd0b --- /dev/null +++ b/example/site/blog/blog/2021-1-25.html @@ -0,0 +1 @@ +I have nothing to blog about diff --git a/example/site/hello.html b/example/site/hello.html new file mode 100644 index 0000000..597ecf5 --- /dev/null +++ b/example/site/hello.html @@ -0,0 +1 @@ +

Hello world!

diff --git a/example/site/index.html b/example/site/index.html new file mode 100644 index 0000000..4c37efa --- /dev/null +++ b/example/site/index.html @@ -0,0 +1,5 @@ +

Welcome to my blog!

+ +

It's not very polished but it's certainly a website

+ +2021-1-25 diff --git a/example/sitefile b/example/sitefile new file mode 100644 index 0000000..811337f --- /dev/null +++ b/example/sitefile @@ -0,0 +1,4 @@ +read ^/$ site/index.html +read ^/hello$ site/hello.html +read ^/blog/.*$ site/blog/ +#/blog/2021-1-25.html turns into site/blog//blog/2021-1-25.html