ht-web-framework/pages.jsonc
2025-04-24 15:10:31 +00:00

34 lines
1.1 KiB
JSON

// Defines the routes used by the Webserver
{
"settings": {
"title": "Title", // tab title
"headerTitle": "Header Title", // title in navbar
// base_* are the default stylesheets and scripts (client side) to load on every page
"base_stylesheets": [], // stylesheets that will always be loaded
"base_scripts": [], // scripts that will always be loaded
"widgets": [], // widgets are the easiest way for quick dynamic data, but should otherwise be avoided
"defaultType": "handlebars" // default template engine to use
},
"paths": {
"get": {
"/": {
"file": "home",
"type": "html", // possible values: "mustache", "handlebars", "ejs", "html"
"scripts": [],
"settings": { // these are part of the context of a object
"stylesheets": [],
"scripts": [],
"widgets": []
},
"restriction": false
}
},
"post": {}
},
"navpages": [
{
"name": "Home",
"url": "/"
}
]
}