⇦ Back
WDX-180
Web Development X
Let’s create a Blog!
A blog is a series of posts over time, that capture your thoughts and publish them to the World Wide Web.
We can use the skills we’ve learned, and the tools we know to create our blog pretty easily.
What you’ll need
You’ll need to:
- Create a new repository. Call it
blog
, make it public. - Create (and push) a new branch called
gh-pages
. - You’ll then need to enable ‘GitHub Pages’ under the repository’s settings, using the
gh-pages
branch to publish your blog. - Take note of the URL of your blog. It should be something like: https://YOUR_USER_NAME.github.io/blog/
The code you need to write
Your blog should have the following:
- An index page,
index.html
in the root of the repo.- This file will act as your homepage. So make it cheery, inviting, and have it list links to all the posts you write.
- This file will also introduce you. Maybe it’s a good idea to tell everyone your pen-name. 🤓
- An HTML file per blog post.
- What you call its filename is up to you, but we’d suggest using a proper date in the filename, or organising these files in folders that have the date. That way you can easily set the order of the posts by date.
- You’ll need at least a good title per blog post, and a few paragraphs, and/or images to go with that title.
- Good structure in your HTML. Use the sectioning semantic elements.
- Have a link back to the index, so your readers can browse to the next post.
- Bonus: Create a template HTML file that you can copy for each post you will create later.
- Extra Special Bonus: Create an RSS XML file to accompany your blog posts. 🚀
Other decisions
Decide on a theme for your blog, your readers will thank you for that.
Here are some ideas:
- A blog that captures your learnings at
intechgration.io
. - A blog that shares what you’re thinking or feeling. Maybe a situation you’re dealing with is really difficult. By expressing that, you might find some solutions.
- Crazy ideas you’ve had for websites, or weaving, or how to improve your daily life.
- Your own idea? The sky is the limit!
The process you need to follow
- Work in
main
. - Create a new file (or folder & file) to contain your new post.
- Copy over the template contents to the new file.
- Make your edits to the new file, writing about whatever has been on your mind.
- Once you’re done, create a new list-item in your index that points to your new post HTML.
- Save,
add
,commit
, andpush
tomaster
. - When you’ve committed and pushed,
merge
yourmaster
changes togh-pages
to publish your blog updates.
If you’ve done everything right, your new blog post will then be available via that URL mentioned earlier.
Sources and Attributions
Content is based on the following sources:
Project maintained by in-tech-gration
Hosted on GitHub Pages — Theme by mattgraham