Initial commit
This commit is contained in:
23
documentation/sitefiles.md
Normal file
23
documentation/sitefiles.md
Normal file
@@ -0,0 +1,23 @@
|
||||
# Part 1: Introduction
|
||||
Every single website hosted with swebs has a sitefile associated with it.
|
||||
|
||||
sitefiles specify the layout of the hosted site. It basically tells swebs what to do to get the response.
|
||||
|
||||
sitefiles consist of commands, which are of the form
|
||||
|
||||
```[action] [arguments]```
|
||||
|
||||
sitefiles also allow comments with #
|
||||
|
||||
# Part 2: Commands
|
||||
|
||||
* ```set [variable] [value]``` - sets some variable for the following pages
|
||||
* ```read [http path] [file path]``` - if the requested path matches ```[http path]```, return the contents of ```[file path]```
|
||||
|
||||
##### Other than set, commands should take in a regex as argument 1 and operate on a file specified in argument 2.
|
||||
|
||||
# Part 3: Variables
|
||||
|
||||
* ```type```: - The type of http request to respond to. One of:
|
||||
* get
|
||||
* post
|
||||
Reference in New Issue
Block a user