5 Steps to Publish a GitHub Pages Blog Post
You have your post content written and reviewed by a friend.
Now you are thinking “Great, where do I put this information?”.
That is understandable!
You put all that time into your post and you want to make sure you’re doing it the correct way.
In this post I will show you where everything goes that you created.
Be sure that you read my previous post on what you needed to create.
Let’s do this
Here are the items you will be updating.
- Save Artwork
- Front Matter Variables
- Categories and Tags
- URL and Slug
- Blog Excerpt
- Related Posts
- Image Locations
- Markdown Content
- Main Heading
- Call to Action
Then we will wrap up by validating the new post by checking for the following:
Create new folders, one for the originals and one for the optimized content.
In my template I use the following folders.
Where the date is the date of the post publish date. This works for me since I have yet to have more than one post on a given date.
All files under the assets folder are part of the website.
Any files in the assets_original folder will not get published to the website. You want to keep them separate to preserve the original size and content.
Front Matter Variables
Start with a new post template file to create new post markdown file. In this post we will use one that is dependent on the theme I previewed in a previous post.
What are font matter variables?
Here is the front matter from my template.
The front matter variables that are specific to this theme.
Categories and Tags
The Categories and Tags will go into their own collection list.
The Slug will be assigned to the matching slug variable.
The URL that you planned out should include the full path including the slug.
For this blog post the URL is websitename/github-pages/10-steps-to-publish-blog-post.
Here are some examples:
I chose to only use one category when deciding on my final URL. There is a strategy to creating the URL that impacts the SEO of the post. I like to make sure my URL does not double up on keywords.
You will update the permalink variable to include the category list you want.
The excerpt that you would like to show on this site and externally will go with the excerpt variable.
The featured.html template will show related posts below the main post content. List out the slug(s) from the posts that you want shown with the related_posts variable.
The title of the blog will be assigned to the matching title variable. Be sure to put your title in double quotes.
The following variables will state the location of the optimized images.
This is the main image that will be used at the top of the post.
This is used by the twitter_card.html template to have information in the required Twitter format.
This is used by the open-graph.html template to populate content used by Facebook.
In this step you will put the blog post material in the area below the front matter variables.
This where you put the introduction, body and the call to action.
I prefer to keep all images and links that I use in a post at the bottom and use markdown references in the main content.
Image defined at the bottom.
Insert External Links
External Link defined at the bottom.
External Link used in the main content.
Insert Internal Links
Internal Link defined at the bottom.
Check Readability and Spelling AGAIN
Now that you have published the new post to your site, open it up in a browser to make sure it looks good.
The easiest way to do this is to use the Hemingway website. Copy the post content from your web browser screen and paste it in the Hemingway website. It will show you misspelled words and sentences that are too complex.
Page Loading Speed
Use the Google PageSpeed Insights tool to make sure there are no issues.
Since you are using a static website the score should be close to 90 or above.
Parting Thoughts - Share Your Work
In a future post I will show you how to set up your computer to test new posts locally.
Now that you have a good format and process for publishing your posts, go out and share them!
Share them on Twitter, Facebook. Email it out to friends. Ask for feedback and continue to improve!
Be sure you read my post on how to add a custom domain to your Github pages blog!