Basics¶
Optimus is usable with a command line tool to build pages, create new projects or enter in a watch mode that automatically rebuilds pages when their templates has been changed.
Structure¶
Here is a very minimalist Optimus project structure:
.
├── pages.py
├── settings.py
├── datas/
└── sources/
└── templates/
However, the default project template available from init command have a more
advanced structure like this:
.
├── babel.cfg
├── cookiebaked.json
├── Makefile
├── project/
│ ├── datas/
│ ├── locale/
│ │ ├── en_US/
│ │ ├── fr_FR/
│ │ └── messages.pot
│ ├── settings/
│ │ ├── base.py
│ │ ├── __init__.py
│ │ └── production.py
│ ├── sources/
│ │ ├── css/
│ │ ├── images/
│ │ ├── js/
│ │ ├── scss/
│ │ └── templates/
│ ├── views/
│ │ ├── index.py
│ │ └── __init__.py
│ └── __init__.py
├── README.rst
└── requirements.txt
From the root directory of your project, you will use a command line like the builder like this:
optimus-cli build
On default, the command lines search for a settings module in your project
directory (as defined from command line argument basedir).
And from the root directory, you will use a command line like the builder like this:
optimus-cli build --basedir=project/ --settings-name=settings.base
Finally default provided structure from command init a Makefile which includes
a lot of tasks to quickly use Optimus like this command line to use the builder:
make build
Use the helper to learn more about available Makefile tasks:
make help
Contributions¶
You may see Optimus-bootstrap that is a Cookiecutter template full featured with a Bootstrap5 frontend.