GitHub Pages#
This site is hosted using GitHub Pages, a hosting service available to all GitHub accounts (for free!). Setting up Lektor to deploy to GitHub is very simple once you’ve configured your machine to connect to GitHub using an SSH connection.
Instructions can be found in the Lektor deployment docs, but here’s a brief summary:
- Add the following line to your Lektor project config file (
project_name.lektorproject
) in the root folder of your site:
[servers.ghpages]
target = ghpages://your-user/your-repository
- If the repository is
username.github.io
, this will be published to your default user site (https://username.github.io). Otherwise, it will be published to the project-specific page (https://username.github.io/project-name) - Once this is set up, you can deploy the current build of your site by executing
lektor build && lektor deploy
from the command line.