If you want to get rolling with Liara right away, here’s a quickstart guide to get you started.
After obtaining pip, use:
pip install Liara
The Liara installation can be customized by adding extras to the installation. Extra features are:
redis: Enables the Redis cache backend.
For instance, if you want to install Liara with Redis support, you would install
Create a project#
Installing Liara deploys the command-line runner
liara, which is your entry point for all future operations. To get started, create a new folder somewhere and run:
This will deploy the required scaffolding for a super-simple blog, which we’ll use throughout this guide.
Build the site#
From the main directory, run
liara build to build the site. The site will be generated in an
output subdirectory by default.
Preview the site#
liara serve to run a local web-server which will show the page. You can edit pages and templates while in this mode and hit refresh to see updates. You cannot add/remove content or change meta-data while running the interactive server though.
By default, the
serve command will open a server that listens on port 8080
and will open your configured browser. This can be configured from the command
Exploring the quick-start template#
The quickstart produces a bunch of folders and files:
contentholds the content, which for the quickstart sample consists of a few blog posts. See Content for more details on how to structure the content.
templatesholds the template files. The quickstart sample uses Jinja2 for its templates, but you can select the template engine using the command line to use Mako instead.
default.yamlin that folder contains the default routes for the templates. See Templates for more information on how to use templates.
generatorscontains a sample generator to create new blog posts. See Generators for more information.
A few configuration files.