This is part five, the last one, of a series teaching Clojure to people with little or no programming experience.
In Part 4 you built a page that responds to what a visitor types.
In this part we'll create a simple blog.
The plan
To build the blog we need to:
List the files in a posts/ folder.
Convert their format (Markdown) into HTML.
Read one specific file when someone asks for it.
Step 1: Write two posts
Create a folder called posts in the root of your project (next to deps.edn , not inside src ).
Inside it create two plain-text files.
posts/hello-world.md :
# Hello, World This is my first post.
## A subheading I wrote it in a plain text file.
Enter fullscreen mode
Exit fullscreen mode
posts/second-post.md :
# Second Post Posts are just files in a folder.
Enter fullscreen mode
Exit fullscreen mode
Markdown is a way of writing formatted text with plain characters: # at the start of a line means "big heading" and ## means "smaller heading".…