Update structure doc
This commit is contained in:
parent
c9411947d9
commit
c2710e7259
@ -1,17 +1,48 @@
|
|||||||
# Known the structure
|
# Known the Structure
|
||||||
|
|
||||||
![CostaPy structure](../images/structure.png "CostaPy have a 4 type of file")
|
This section outlines the directory structure for the framework and provides descriptions for each directory and its purpose. Understanding this structure is crucial for configuring and extending the framework effectively.
|
||||||
|
|
||||||
It have a 4 type of file:
|
## Directory Overview
|
||||||
- Main
|
|
||||||
- Core
|
|
||||||
- Configuration
|
|
||||||
- Content
|
|
||||||
|
|
||||||
`Main` is the file that you will run with the Python.
|
### `core`
|
||||||
|
This directory contains static directory and templating core scripts. It is a critical part of the framework with the following contents:
|
||||||
|
|
||||||
`Core` is the place to put the extension script.
|
- **`staticdir` (required):**
|
||||||
|
- Used by the launcher `costa.py` to merge a static handler from directory configuration.
|
||||||
|
- **`template` (required):**
|
||||||
|
- Supports `config.directory` by adding a static handler from templates.
|
||||||
|
- **`html` (optional):**
|
||||||
|
- Provides a HTML templating. Will not be used if you do not have a template.
|
||||||
|
|
||||||
|
### `config`
|
||||||
|
This directory holds configuration files for the framework.
|
||||||
|
|
||||||
|
### `script` (optional)
|
||||||
|
A directory to store additional patches or scripts for extending the functionality of the framework.
|
||||||
|
|
||||||
|
### `procedure` (optional)
|
||||||
|
Contains stable, update-less functions. One or more modules might use these functions.
|
||||||
|
|
||||||
|
### `modules`
|
||||||
|
A mandatory directory that contains the modules of the framework. This is the core functionality of your application.
|
||||||
|
|
||||||
|
### `static` (optional)
|
||||||
|
A front-end static directory. This directory can hold assets like:
|
||||||
|
- CSS
|
||||||
|
- JavaScript
|
||||||
|
- Fonts
|
||||||
|
- Other front-end libraries
|
||||||
|
|
||||||
|
### `templates` (optional)
|
||||||
|
A front-end directory specifically for templates. Use this to organize reusable front-end templates.
|
||||||
|
|
||||||
|
### `pages` (optional)
|
||||||
|
A front-end directory for pages. Use this to organize individual front-end pages.
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
- Required directories such as `core`, `config`, and `modules` must be present for the framework to function properly.
|
||||||
|
- Optional directories like `script`, `procedure`, `static`, `templates`, and `pages` can be added as needed based on the project's requirements.
|
||||||
|
|
||||||
|
By adhering to this structure, you ensure clarity, consistency, and modularity in your framework.
|
||||||
|
|
||||||
`Configuration` is for configuration.
|
|
||||||
|
|
||||||
and `Content` is the place for you to create a content.
|
|
||||||
|
Loading…
Reference in New Issue
Block a user