Skip to content

How to Draft a Blog Post

Mateo Clarke edited this page May 29, 2016 · 6 revisions

How to Draft a Blog Post

 

There are three primary options:

  • (Easiest) Draft it as a markdown file or Google doc and send it to @mateoclarke or @luqmaan.
  • (Hardest) Clone the open-austin-org repo to your local computer and submit your draft via a Pull Request to master. I use an app called MacDown to edit Markdown files. The main advantage to this option is that you can preview what the post will look like on your local machine before deploying.
  • (Recommended) Try drafting it on Github.com

 

How to draft on Github.com

  1. Go to: https://github.com/open-austin/open-austin.github.io/tree/master/_posts
  2. Create a new file (see image)
screen shot 2016-03-07 at 2 36 01 pm
  1. name the file YYYY-MM-DD-title-of-article.md - EX: open-austin.github.io/_posts/2016-03-10-code-across-austin-2016-recap.md screen shot 2016-03-10 at 12 33 00 am

  2. Use the template below at the top of your new markdown file. (It's called YML Front Matter).


    layout: post title: Title of your article date: YYYY-MM-DD type: post published: true thumb: filename.jpg thumbalt: Alt text describing the thumbnail author: first_name: First last_name: Last

    Begin your the body content of your post here. Use markdown syntax.

4b. _A small gotcha_: Jekyll doesn't like if you include the character `:` in a string. For example, if the title of your post was `2001: A Space Odyssey`, Jekyll would barf. To avoid this, either don't use `:` or wrap your string in quotes, like `"title: 2001: A Space Odyssey"`.
  1. Draft the body of the post below the --- in Markdown and/or HTML (Markdown compiles to HTML).
  2. Upload the thumbnail image (aka: featured image) you specified in the front matter to the assets/images directory. You should be able to click the "Upload files" button. - All other photos you want to include in the body of the post also need to be uploaded here and referenced in the post as ![alt text describing the image](/assets/images/imagefile-name.jpg). - Thumbnail images shouldn't be wider than 250px. - Body images shouldn't be wider than 778px but 500px is recommended. upload-photos screen shot 2016-03-10 at 12 42 03 am
  3. Once you are done drafting the file and uploading images, save your file creating a new branch, opening a pull request and requesting someone to review and merge. - OR Publish it straight to master. Do this if you feel brave.
screen shot 2016-03-07 at 2 54 17 pm
Clone this wiki locally