Skip to content

How to Draft a Blog Post

Andrew Nelson edited this page Apr 23, 2017 · 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 in your new markdown file. (It's called YML Front Matter). 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".

     ---
     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.
    
  3. Draft the body of the post below the --- in Markdown and/or HTML (Markdown compiles to HTML).

    • It can be nice to include Twitter embeds in the body of your post. Just a note that if you have more than one tweet embedded you only need to include Twitter's script (<script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script>) once. This is just a small (probably insignificant) performance suggestion.
  4. 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
  5. 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