aboutsummaryrefslogtreecommitdiff
path: root/README.md
blob: be7aeafabe8993fd46b136acadfef2dd6db1eb89 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# spa

Example SPA approach to a simple blog website.

## prerequisites
- [caddy web server](https://caddywebserver.com)

## run
launch with `caddy run` and open the browser to http://localhost

## how it works

caddy tries to load from files, and falls back to index.html by default if no file matches.

[index.html](./index.html) has a plain page template and uses javascript to dynamically create navigation and load the content.

[routes.json](./routes.json) file contains the metadata for website pages (currently just title and content location)

content/* files are HTML content to be embedded in the page template.

assets/* files are just plain files to be served direct.