Generates directories and files for multi-page site with backend on Go (gin).
Generates:
- layouts
- views (page templates)
- controller stub with in/out params parsing
- utils for bootstrap
Requirements:
- Jinja2
- Python3.4+ (actually could run even on lower version but I didn't test)
pip install mpa-gen
- Create empty directory and go into it
- Install latest mpa-gen
pip3 install --upgrade --user mpa-gen
- Initialize go project
go mod init myproject
- Generate site structure
mpa-gen portal main
usage: mpa-gen [-h] [--dir DIR] [--method METHOD] section name
multi-page site generator
positional arguments:
section Section name (ex: user/messages)
name Resource name (ex: dialog)
optional arguments:
-h, --help show this help message and exit
--dir DIR Root directory
--method METHOD HTTP method: GET or POST
- default method:
GET
- default directory: current working dir