Project Structure
SnowCMS expects directories and files to be in specific places.
Project Structure
- snowcms.config.ts
- package.json
Directorysrc
Directoryhooks
- hooks.config.ts
- example-hook.ts
- …
Directoryinputs
- inputs.config.ts
- example-input.ts
- …
Directoryroutes
- routes.config.ts
- example-routes.ts
- …
The src
directory is only required if you want to extend the CMS by adding custom hooks, inputs, and routes.
snowcms.config.ts
This file contains the configuration for the CMS.
package.json
All Node projects have a package.json
file which package managers use to manage dependencies.
src/hooks
This directory stores custom hooks.
A hooks.config.ts
file is required if you want to register custom hooks.
src/inputs
This directory stores custom Inputs.
A inputs.config.ts
file is required if you want to register custom Inputs.
src/routes
This directory stores custom routes.
A routes.config.ts
file is required if you want to register custom routes.