Structure
Theme Directory Structure:
Here is the structure of the default theme bootstrapped using FDK CLI. All theme code resides in a themes
folder. The themes
folder further consists of certain mandatory and non-mandatory sub directories.
├── .fdk
├── themes
│ ├── assets
│ ├── components
│ ├── config
│ ├── constants
│ ├── custom-templates
│ ├── helper
│ ├── page-layouts
│ ├── pages
│ ├── sections
│ ├── styles
│ └── index.jsx
├── .eslintrc.js
├── .gitignore
├── config.json
├── package-lock.json
├── package.json
├── README.md
└── webpack.config.js
The following are the mandatory sub-directories and files that the theme folder must have.
- index.jsx: This is the entry file for our react theme. This file consists of a default exported function that bootstraps the theme bundle object in the engine.
- config: This directory houses the 2 config files for our theme viz .
settings_data.json
andsettings_schema.json
. - custom-templates: All the custom templates of our theme are to be placed in this folder Custom Pages:
- pages: All the system pages are to be kept in this folder. Any other file which does not correspond to a system page name may throw error during theme sync. System Pages:
- sections: This is for the re-usable section components which are a part of current theme. Sections , Used in Section Pages:
All other components/ pages can be put in any other directory of your choice.