- Clone this repo somewhere on your machine.
- Install Python
- Install Lektor
- Lektor requires imagemagick which can be installed via
brew install imagemagick
on OS X.
- Lektor requires imagemagick which can be installed via
- To run the dev server run
lektor serve
, which will start a web server athttp://127.0.0.1:5000/
where you can preview the site, and access the admin panel.
Adding content in Lektor is pretty easy, just go to the localhost server and use the UI to add a new page.
Adding content manually is also pretty straightforward, for the most part you need to do two things:
- Create a folder somewhere in the
/content
folder, where the name of the folder will be the desired URL slug (for examplecontent/hello-world/
will becomewww.pspython.com/hello-word/
). - Create a
contents.lr
file in the folder you just created, this will host all of the text content and other settings for the page. Acontents.lr
file is is a key-value file, where each key and value is separated by---
, which allows values to be multiline. - If you want to use a UI to do this work for you, you can start the dev server and navigate to the admin panel http://localhost:5000/admin/root/edit
- For additional info see the Lektor Content Docs
- Determine what icon you want to use for the link
- Open databages/home_links.json
- Add an object that specifies the href, icon, and title
- Add the key to that object in the "links" array
- Open coc_staff.json
- Add the new staff member
- Create a new folder in
content/
, where the folder name is the desired URL of your post (for examplecontent/hello-world
will becomewww.pspython.com/hello-world
) - Add a
contents.lr
file with the following contents:_model: page --- title: Your Title Here (Can be different than folder name) --- body: # The Contents of the page All of this supports [Markdown](https://www.markdownguide.org/basic-syntax)
Deploying is easy:
First you must build:
$ lektor build
Then deploy:
$ lektor deploy ghpages
Lektor will commit the built site to the gh-pages
branch, and push, which will get deployed by
GitHub automatically.