Created an example
This commit is contained in:
2
example/README
Normal file
2
example/README
Normal file
@@ -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.
|
||||
3
example/run.sh
Executable file
3
example/run.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
swebs -s sitefile -o logs -p 8000
|
||||
11
example/site/blog/README
Normal file
11
example/site/blog/README
Normal file
@@ -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
|
||||
1
example/site/blog/blog/2021-1-25.html
Normal file
1
example/site/blog/blog/2021-1-25.html
Normal file
@@ -0,0 +1 @@
|
||||
<p1>I have nothing to blog about</p1>
|
||||
1
example/site/hello.html
Normal file
1
example/site/hello.html
Normal file
@@ -0,0 +1 @@
|
||||
<h1>Hello world!</h1>
|
||||
5
example/site/index.html
Normal file
5
example/site/index.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<h1>Welcome to my blog!</h1>
|
||||
|
||||
<h3>It's not very polished but it's certainly a website</h3>
|
||||
|
||||
<a href="blog/2021-1-25.html">2021-1-25</a>
|
||||
4
example/sitefile
Normal file
4
example/sitefile
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user