Skip to content
This repository has been archived by the owner on Jun 15, 2024. It is now read-only.

Writing posts

Eugene Cheung edited this page Sep 22, 2015 · 3 revisions

Two kinds of posts are on cssu.ca: Events and News. To create a new post:

  1. Create a new branch from draft and name it post/<title> where <title> is a short name of your post. Either use Git on your computer, or simply use the GitHub interface to create the branch:

    Create a git branch

  2. Create a new Markdown file in either _posts/events or _posts/news, and follow the naming convention of yyyy-MM-dd-title.md, where yyyy is the year, MM is the month of the year, dd is the day in the month, and title is a lowercase, dash-separated title of the post. See existing posts for examples. You can also use the PostGen tool for creating the Markdown files.

  3. Add Jekyll frontmatter to the top of the new file, with a minimum of the following:

    ---
    layout: post
    title:  "Example title"
    description: "Example description"
    date:   yyyy-MM-dd
    categories: <events|news>
    ---
  4. Write the content of your post below the frontmatter. The syntax is similar to GitHub Flavored Markdown, including fenced code blocks.

  5. (Optional) Preview the site on your computer by setting up Ruby and Jekyll.

  6. Create a pull request from your branch onto draft and assign it to @qasim for review.

Once your pull request is merged into draft, your post will be available on https://draft.cssu.ca, and will show up on https://cssu.ca when we deploy the site.

Clone this wiki locally