Add a Post With An Image

blog header

Start by adding a new post

Start by going to your main repository. There should be a folder there with a sample post that was created for you by Jekyll Now, or one that you created. Click on “Create new file” and then add a title using the same format you see on your other post(s):

2018-11-2-Title-Of-Your-Post.md

You should be presented with a blank page and you can start editing or adding content (text and photos). Finally, open one of your old posts (I like to open the post in a new tab), click the pencil to go to the editor, and copy/paste everything from an old post to the new file. Change the title in the head matter (top of the post) to match your file’s name.

Adding a picture to Github

Before you can add a picture to your post you need to upload it to Github and put it into your “images” folder.

First you need to find a photo. You can use one of your own – the easiest way to get it is to upload it from your phone to your Google Drive, then download it to your computer’s “Downloads” folder, or do go to Pexels and download a free photo.

There’s more information on finding and downloading images in the “Add An Avatar” section of this blog post.

Now, go to the main part of your repository (where you see all of your folders and files) and click on “images.” You should see files that end with “.jpd” and “.png.” Click on the “Upload Files” button, click “choose your files,” and then find the image in your computer’s downloads folder. Now you should be ready to go.

Adding a picture to your post

All you have to do to get the photo into your post is to use this code and replace with .

![Give Your Photo A Title](/images/name-of-your-image.jpg)

Be careful to notice what kind of image you have on your computer – if it’s a PNG file, put “.png” at the end of your image name instead of “.jpg”.

That’s it – Now go out and impress the world!

Written on November 2, 2018