-
Notifications
You must be signed in to change notification settings - Fork 22
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 tomaster
. 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
- Go to: https://github.com/open-austin/open-austin.github.io/tree/master/_posts
- Create a new file (see image)
-
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
- EX:
-
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 was2001: A Space Odyssey
, Jekyll would barf. To avoid this, either don't use:
or wrap your string in quotes, liketitle: "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.
-
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.
- 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 (
-
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
but500px
is recommended.
- 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
-
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.
- OR Publish it straight to