Skip to content

pycascades/pycascades-2025

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pycascades-2025

The static website for 2025.pycascades.com built with Lektor

Setup

  1. Clone this repo somewhere on your machine
  2. Install Python, and create a virtualenv
  3. Install Lektor
    • pip install lektor
    • Lektor uses imagemagick, you'll need to install this as well
  4. Start the dev server with lektor serve
    • This starts a web server at http://127.0.0.1:5000/, where you can preview the site and use the admin panel to add new pages or other content.

Adding Content

Adding content in Lektor is relatively easy once you know how to do it. There are two main ways to add content to the Lektor site:

  • Via the localhost web server (accessed by running lektor serve and navigating to http://127.0.0.1:5000/)
  • Adding a folder within the content folder, and putting a contents.lr file in it
    • A contents.lr file is is a key-value file, where each key and value is separated by ---, which allows values to be multiline.

Each page on the static site has an associated model, the default model type is the page model, defined in the models/page.ini file. You can change the model for each page by setting the _model key in your contents.lr file. For more information see the Lektor docs.

Each model has a default template associated with it, the template file matches the model name, so the page model is rendered by the page.html template found in the templates/ folder. The template files are Jinja2 HTML templates. Additional information regarding templates can be found in the Lektor docs.

Adding Pages

To add a new page navigate to the local host server, then navigate to the page that you want your new page to be the child of. For example, to add a new page under the "about" section of the site:

  1. Navigate to http://127.0.0.1:5000/about/
  2. Click the pencil icon in the top right corner to navigate to the page admin mode
  3. Click Add Page in the Page Actions on the left side of the screen
  4. Set your model, title, and ID
    • Page is the default model, it will let you write page content in markdown
    • Title this will be rendered as the tab title, and what you see in the page admin mode when navigating between pages
    • ID is the "url slug", and the underlying folder name. It is autogenerated, typically you don't need to change the default value.
  5. Fill out the additional fields on the next page
    • You can change the title at any time, but it will not change the ID. To change the ID you'll need to manually rename the folder
    • If you chose the "Page" model the only other thing you can edit is the "body", this is a Markdown field
  6. Attachments can be added as well, for more information see the Lektor docs.

Adding Organizers

  1. Navigate to http://127.0.0.1:5000/about/the-team
  2. Click the pencil icon on the top right corner
  3. Click Add Page in the Page Actions on the left side of the screen
  4. Set your title, and ID
    • Note: you cannot choose a model here, because it is automatically selected to be a blog-post model, because the news page uses the blog model, which specifies that child pages use the blog-post model.
  5. Fill out the additional fields on the next page
  6. Add an attachment called profile.jpg that will be used as their photo on the team page

Adding News Posts

  1. Navigate to http://127.0.0.1:5000/news/
  2. Click the pencil icon on the top right corner
  3. Click Add Page in the Page Actions on the left side of the screen
  4. Set your title, and ID
    • Note: you cannot choose a model here, because it is automatically selected to be a blog-post model, because the news page uses the blog model, which specifies that child pages use the blog-post model.
  5. Fill out the Author, Publication date, Intro, and Body on the next page
    • Intro should be the first paragraph or so of content that you want visible on the /news page which lists all of the recent blog posts
    • Body is the main content of the post, but is hidden from the list view

Saving Your Changes

All changes you make, either edits to a specific page, or new pages added, are all saved to disk. Once you are done you'll want to commit the new or changed files to your branch in Git, and open a pull request. An organizer will review your changes and merge them if they are ready. Once merged an organizer will deploy your changes to the live site.

Deploying

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.

TODO

  • Write docs
    • Adding and Editing Speakers
  • Add model for Schedule
    • Including Docs
  • Finish base layout and styling
    • Speakers
  • Add in-page links in page overviews
    • Health and Safety Policy
    • Health and Safety FAQ
  • Add YouTube video embed to attending/attending-remotely page
  • Fill out the content for the following pages:
    • Attending
      • Attending In Person (partially completed)
      • Tour Portland
    • Program
      • Schedule
      • Social
      • Speakers
      • Sponsors
      • Sprints
    • News

About

The static website for 2025.pycascades.com built with Lektor

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published