Mini lesson · English

How to add a blog to your website

Give an assistant your article text, add it to the ready blog and verify that readers can open, read and return from it.

Start the interactive lessonRead the lesson below

Who is this for?

People who want to publish writing on a small website. You can supply ordinary text while a coding assistant creates the page and links; HTML knowledge is not required.

Before you start

The supplied three-article workshop and a coding assistant to open its local HTTP preview. No CMS account or personal project history is required; a provided small repair exercise can give you something real to write about.

Estimated time: 19–31 min

Estimates for the supplied starter files with prerequisite accounts and tools ready. Setup, deployment queues and delivery/DNS waits take additional time. Writing and editorial review can take longer than wiring the HTML.

What you will learn

  • Turn an ordinary draft into a readable article page.
  • Connect it from the blog list with a usable direct address.
  • Check reading and navigation without relying on client-side effects.

Workshop files

Step 1

Decide what the reader will learn

A real article must sit behind the list card.

Open the supplied blog and its three sample posts. Choose one small useful subject. If you have no previous project, perform the supplied contact-link repair exercise and write about what you actually did.

Keep fictional practice writing labeled. A card and empty destination are not a published explanation.

A concrete example

A short account of a reproduced problem, repair and check can teach more than a vague opinion.

Use the supplied blog files. Turn my ordinary text into one new readable article with a clear title, honest byline/date, useful opening and return link. Add its matching index entry without replacing the existing posts. Handle the HTML and styling paths. Show the direct page and help test reading, return navigation and a narrow screen.

Files for this step

Start hereWorkshop files

Open or download the files below. When saving a project, keep the folder paths shown in the filenames.

How it works (optional)

Add a blog people can actually read

Start with a complete article and a reliable way to find it.

A blog is more than a grid of cards. Each article needs a clear subject, readable body, author/date and an address that another person can open directly.

This workshop supplies three short teaching posts, an index and return links. They use HTML so the writing is available without running browser JavaScript. The author is deliberately a fictional practice label.

Worked example

Open public/blog/test-one-task.html. Its first paragraph proposes a concrete visitor task, then explains what to observe and what to change. The card summary helps people choose it; it does not replace the article.

Extra implementation exercise

A card says “Read more”, but its link opens the same empty page for every article. What is missing?

Show a worked solution

Each card needs a real article at its own stable URL. Give that page a useful body and a route back to the index.

  • Requires a distinct working article address.
  • Requires substantive body content.

Step 2

Have the assistant create the article

Supply text and judge the reading result.

Give the assistant your title, opening and body text. Ask it to use the supplied article structure, keep author/date truthful and preserve the existing blog style and return route.

Open the new article directly and read it. Check that text and styling appear correctly, including on a narrow screen. You do not need to edit the HTML structure yourself.

A concrete example

A copied article one folder deeper can lose its styling if its paths are wrong.

Files for this step

Start hereWorkshop files

Open or download the files below. When saving a project, keep the folder paths shown in the filenames.

How it works (optional)

Make the article structure repeatable

Reuse presentation while keeping each article's meaning specific.

Inspect the article HTML: one h1, a byline, a machine-readable time, an opening summary and body paragraphs. Its stylesheet path goes up one directory because the article sits inside blog/.

Keep a descriptive slug stable after sharing. If you rename a published URL, add a redirect rather than leaving inbound links broken. Publication dates should reflect actual publication, not automatically change on every build.

In ../index.html, '..' moves up from blog/ to the parent site folder. The same rule makes ../style.css reach the shared stylesheet. If you add another nesting level, work out the destination from the article's actual folder rather than copying a path by appearance.

Worked example

A relative link ../index.html returns from blog/test-one-task.html to the index. Copying index.html without the ../ would look for a different page inside blog/.

<time datetime="2026-11-15">15 November 2026</time>
<a href="../index.html">All notes</a>

Extra implementation exercise

Why can a stylesheet work on the blog index but fail on an article copied one directory deeper?

Show a worked solution

A relative style.css now points inside blog/. Use ../style.css for this folder layout or a correct site-root path, then verify the request returns CSS.

  • Resolves paths relative to the article location.
  • Checks the actual stylesheet request.

Step 3

Connect the list and return route

Check the same path a reader will use.

Ask the assistant to add a unique title, short summary and link for the new post on the blog index. Follow that link, then the article’s return link.

Each card should open its own substantive article. A small file-based blog is enough unless your real editing workflow needs another tool.

A concrete example

Three articles alone do not require a CMS; a nontechnical publishing workflow might.

Astro: content collections

Files for this step

Start hereWorkshop files

Open or download the files below. When saving a project, keep the folder paths shown in the filenames.

How it works (optional)

Choose tools when the workflow needs them

A CMS is valuable when it solves an editorial problem you actually have.

For a few posts maintained by one person, files and Git can be enough. A static generator such as Astro can reduce duplicated templates as the archive grows.

A CMS can help multiple editors, drafts, asset management and nontechnical publishing. It also adds access control and operating dependencies. Compare against your publishing workflow, not a list of fashionable stacks.

Worked example

If an editor cannot use Git but must publish independently, a CMS addresses a real need. If one author posts occasionally, introducing an editor backend may add work before it saves any.

Astro: content collections

Extra implementation exercise

Which would justify a CMS more clearly: having three articles, or needing a nontechnical editor to manage drafts?

Show a worked solution

The nontechnical editor requirement is stronger evidence. Article count alone does not tell you whether a CMS improves the workflow.

  • Uses an actual workflow requirement.
  • Acknowledges additional operational complexity.

Step 4

Publish one complete explanation

Finish both the writing and the navigation.

Complete the fourth article and its list entry. Ask someone to describe its main point from the opening, or do a careful fresh read yourself. Use the complete reference as a comparison after your attempt.

Try the direct URL, list link, stylesheet and return route. Keep actual test observations separate from the reference’s expected behavior.

A concrete example

The article should still contain meaningful writing when fancy browser effects are unavailable.

Files for this step

Start hereWorkshop files

Open or download the files below. When saving a project, keep the folder paths shown in the filenames.

How it works (optional)

Your assignment: publish one useful explanation

Write a specific lesson from your own work, with an example a reader can follow.

Add a fourth article explaining one problem you actually solved. Include the starting situation, the change and how you checked it. Use a small concrete example, not a fictional experience presented as yours.

Add its index entry and verify direct opening, stylesheet loading and return navigation. Ask someone to describe the article's main point after reading the opening.

Worked example

“I reduced an image from an oversized original to responsive sources and checked the downloaded file” teaches more than “Performance is important”. Your numbers must come from your own measurement.

The complete reference walkthrough is available in reference/assignment-walkthrough.txt. Compare its steps with your own result; fill the test record from observations in your own project.

Extra implementation exercise

Produce the fourth article and a working index entry.

Show a worked solution

Use the complete reference fourth article as a structural example: it explains how a mismatched contact anchor is diagnosed, changed and retested. It is explicitly a fictional practice case, not your or Emre's personal history.

For your submission, choose a problem you actually solved. Describe the starting symptom, exact change and observed check in your own words. Keep a truthful byline/date and a stable filename; then add the article's title/summary/link to the index.

Open the article directly with JavaScript disabled, verify the stylesheet and use its return link. A working card without substantive article content is not complete.

  • Contains a specific example and an accurate author/date.
  • Direct URL, styling and return navigation work without JavaScript.

Was this lesson useful?

Leave a like, or share it with someone who could use it.

Continue learning

Explore the other lessons