Skip to content

Render Engine CLI

Render Engine comes with a CLI that can be used to create, build, and serve your site.

creating your app with render-engine init

CLI for creating a new site configuration.

Parameters:

Name Type Description Default
collection_path pathlib.Path

create your content folder in a custom location

typer.Option(pathlib.Path('pages'), help='create your content folder in a custom location', rich_help_panel='Path Options')
force bool

Force overwrite of existing files

typer.Option(False, '--force', '-f', help='Force overwrite of existing files', rich_help_panel='Flags')
output_path pathlib.Path

custom output folder location

typer.Option('output', help='custom output folder location.', rich_help_panel='Path Attributes')
project_path_name pathlib.Path

name of render_engine app name

typer.Option('app.py', help='name of render_engine app name', rich_help_panel='Path Attributes')
project_folder pathlib.Path

path to create the project

typer.Option(pathlib.Path('./'), help='path to create the project in', rich_help_panel='Path Attributes')
site_author typing.Optional[str]

Author of the site

typer.Option(None, help='(Optional): Author of the site', rich_help_panel='Site Vars')
site_description typing.Optional[str]

Site Description

typer.Option(None, help='(Optional): Site Description', rich_help_panel='Site Vars')
site_title typing.Optional[str]

title of the site

typer.Option(None, '--title', '-t', help='title of the site', rich_help_panel='Site Vars', show_default=False)
site_url typing.Optional[str]

URL for the site

typer.Option(None, '--url', '-u', help='URL for the site', rich_help_panel='Site Vars', show_default=False)
skip_collection bool

Skip creating the content folder and a collection

typer.Option(False, '--skip-collection', '-C', help='Skip creating the content folder and a collection', rich_help_panel='Flags')
skip_static bool

Skip copying static files

typer.Option(False, '--skip-static', '-S', help='Skip copying static files', rich_help_panel='Flags')
static_path pathlib.Path

custom static folder

typer.Option(pathlib.Path('static'), help='custom static folder', rich_help_panel='Path Attributes')
templates_path pathlib.Path

custom templates folder

typer.Option(pathlib.Path('templates'), '--templates-path', help='custom templates folder')

collection-path (Path: default="pages")

The path to the folder that will contain your collections. This is where you will put your data files to be processed.

force (bool: default=False as no-force)

Overwrite existing files and folders. If no-force, an error will be raised if ANY of the files already exist.

output-path (Path: default="output")

The path to the output directory. This is where your rendered site will be served.

project-path-name (Path: default="app.py")

The name of the python file that will contain the Render Engine setup. This is where you will define your site, pages and collections.

project-folder (Path: default=".")

The name of the folder that will contain your project. This is where your project-path-name, output-path, templates-path, and collection-path will be created.

site-description (str|None: default=None)

A short description of your site. This will be passed into the Site object and available in site_vars.

site-author - (str|None default: None)

The author of the site. This will be passed into the Site object and available in site_vars.

skip-collection (bool: default=False as no-skip-collection)

If True, a collection-path folder will not be created.

skip-static - (bool: default: False as no-skip-static)

If True, will not create the static folder. This is where you will put your static files (images, css, js, etc).

templates-path (Path: default="templates")

The path to the folder that will contain your templates. This is where you will put your Jinja2 templates.

Building your site with render-engine build

CLI for creating a new site

Parameters:

Name Type Description Default
site_module str

module and class name of the site

required

build takes the site_module parameter in the format of module:site. module is the name of the python file that contains the site variable you've initialized. If the site site variable is in the app.py file, then the site_module parameter would be app:site.

Serving your site (locally) with render-engine serve

Create an HTTP server to serve the site at localhost.

Warning

this is only for development purposes and should not be used in production.

Parameters:

Name Type Description Default
module_site typing.Optional[str]

Python module and initialize Site class

typer.Option(None, '--build', '-b', help='module:site for Build the site prior to serving')
build

flag to build the site prior to serving the app

required
directory typing.Optional[str]

Directory to serve. If module_site is provided, this will be the output_path of the site.

typer.Option(None, '--directory', '-d', help='Directory to serve', show_default=False)
port int

Port to serve on

typer.Option(8000, '--port', '-p', help='Port to serve on', show_default=False)