Folder Structure
This documentation only supports base template structure, New templates will be support in future.
Pages Folder
Pages folder is one of the most important folder as it acts as views folder in express
server, It contains all pages which will be served on the backend. As @zarejs/cli
supports file base routing the file/folder names will be converted to route names, e.g.
pages/index.zare
->/
pages/about.zare
->/about
pages/blog/[id].zare
->/blog/:id
pages/404.zare
->404 Not found
page
It is important to name your pages folder as Pages
, But you can modify this settings in zare configurations file. see this
Components Folder
This is a convention that you must declare all your components like navbar.zare
or footer.zare
in the ./components
folder of root, But you can name it anything.
Static Folder
Static folder contains all static files, e.g. style.css
, main.js
and favicon.ico
. It is also important to name your folder as static
, But you can change this settings from zare configurations
base.zare
The base file is a layout file in the zare template engine, you can read more about it here.
zare.config.js
This is configurations file for zare, you can read more about it here.