Added dynamic pages

This commit is contained in:
Nate Choe
2022-01-31 22:35:46 -06:00
parent 1086edf6d0
commit 7c7460d37f
12 changed files with 1428 additions and 46 deletions

View File

@@ -14,6 +14,7 @@ sitefiles also allow comments with #
* ```set [variable] [value]``` - sets some local variable for the following pages
* ```define [variable] [value]``` - sets some global variable
* ```read [http path] [file path]``` - if the requested path matches ```[http path]```, return the contents of ```[file path]```. If [file path] is a directory, then the http path is appended to [file path] and that is read instead.
* ```exec [http path] [file path]``` - if the requested path matches ```[http path]```, execute ```[file path]``` and send the the contents of stdout. ```argv[0]``` is the ```[file path]```, ```argv[1]``` is a header, ```argv[2]``` is the value for that header, ```argv[3]``` is the next header, and so on.
##### Other than set, commands should take in a regex as argument 1 and operate on a file specified in argument 2.