- main (special-cased unremovable piece)
- about
- bio, resume, contact
- arcade
- blog
- shop
- cart_api, checkout, inventory
- gallery
blueprints
: A list of blueprints to be imported and registered on the Flask instance.root
: Name of the Python module containing the blueprint that won't have its routes prepended with the blueprint's name. Ordinarily, routes will have the blueprint prepended to the route. A blueprint being root means that all routes in that blueprint will maintain their exact routes. Note: Theindex_route
of this blueprint will be/
if this blueprint is also root in the "main" module. E.g., shop blueprint is the root blueprint of the shop module, so shop.shop_index becomes/
if the shop blueprint is also root of the main module, else shop.shop_index becomes/shop
, but shop.allproducts is always/products
unless the shop blueprint isn't root of anything.index
: Endpoint of the index for this module. This is the endpoint which will be / if this module is the root module, otherwise the endpoint which will be linked to by the module's tab in the navbar.env
: List of critical environment variables which will be needed by the module. If these variables aren't set in production, the app won't start. In development a warning will be logged instead.ignore
: List of routes from this module which will be ignored; use to remove unused pages. E.g., if a shop doesn't need categories you may ignore["shop.shop_category_index"]
(or justshop_category_index
if shop is the root module).name
: The human-readable name of the module which might be displayed somewhere in a future version
- To create a new URL on the webapp, create a module by creating a Python package inside the
controllers
package. In this package, import Blueprint and use it like you would in any other Flask app. Edit the JSON to include the new Python package and name of the blueprint variable. Note: The name of the blueprint (passed in the constructor) will be pre-pended to the URL unless the module is defined asroot
- HTML templates are in
config/templates
and site-specific overrides of templates should be inconfig/client/<instance>/templates
(useCONFIG_PATH
environment variable) - Markdown can be used for some text-heavy parts of the site. It goes in a
markdown
directory within the config path. Markdown is parsed into HTML before reaching the Jinja template, so you must tell Jinja not to escape the HTML. - Currently the template directories are hardcoded on line 87 of
src/helpers/main/app_factory.py
so you have to edit that file to add a new directory. In future we might automatically determine the loader path based on module name.
- In Jinja templates, use the
selected
variable for the current tab. This is a pretty minor detail so I'm just using unique numbers for whatever pages I want to be a page as I decide to add them.
- about.about_page
- shop.shop_product_list, shop.view_product
- account.login, account.register, account.reset_password
- arcade.arcade_index, arcade.game_page, arcade.token_leaderboard
- about.bio_page
- blog.blog_newest_posts
- about.resume_page
- contact.contact_page