-
Install Python and pip Make sure Python is added to PATH environment
-
Install virtualenv using pip:
pip install virtualenv
-
Create virtual environment in project root:
virtualenv venv
-
Activate virtual environment: Windows:
.\venv\Scripts\activate
Linux:
source ./venv/bin/activate
type
deactivate
to deactivate virtualenv -
Make sure your venv is active:
pip -V
it should show current python interpreter in use. Must be the one inside project'svenv
folder. -
Install requirements:
pip install -r requirements.txt
-
Istall plugins clone to
./src/itsp
https://github.com/getpelican/pelican-plugins
-
Create environment settings inside
./src/itsp/conf
folder: Create newenv_conf.py
file from env_conf.py.example Create newdev_conf.py
file from dev_conf.py.example and fill in all the required settings for your local evironment Create newtest_conf.py
file from test_conf.py.example and fill in all the required settings for your testing evironment Create newprod_conf.py
file from prod_conf.py.example and fill in all the required settings for your production ready evironment -
Switch between
dev
,test
andprod
insideconf/env_conf.py
if you want to generate files for production or local development
Make sure you always use virtual environment before doing something in terminal.
You can check for current environment with: pip -V
. It should show current python interpreter in use. Must be the one inside project's venv
folder.
https://docs.getpelican.com/en/stable/index.html
cd to project folder ./src/itsp
pelican --help
helppelican content
generate output filespelican -r
watch for changes in filespelican --listen
run devserver at 127.0.0.1:8000
cd to themes/itsp
- Extract translatable strings from templates
pybabel extract --mapping babel.cfg --output messages.pot ./
- Initialize message catalogs
pybabel init --input-file messages.pot --output-dir translations/ --locale lang --domain messages
lang
should be locale likeru
oren
- Fill the message catalogs with translation strings in *.po files inside
themes/itsp/translations
folder - Compile the message catalogs
pybabel compile --directory translations/ --domain messages