Welcome to a Blog powered by Swift
Hello and welcome to a blog powered by Swift! That's right, this website uses the Perfect web server written entirely in Swift. I had so much fun working with it I decided to write a series of blog posts about the experience.
Why Reinvent the 'Blog' Wheel?
So why would I write my own blog from scratch rather than using an existing platform like Wordpress, Medium, etc? Here's why:
- Swift: I'd like to start writing server-side Swift code and Wordpress cannot help me with that.
- Markdown: I'd like to write blog posts as plain text files using markdown syntax.
- Git: I'd like these text files to participate in Git; I don't want to manage a database.
I started this project with very little Perfect experience so I had to get down to basics. I watched tutorials, reviewed example projects, read documentation, and experimented with many scratch projects.
I eventually found the tools and approaches that worked for me and satisfied my project requirements. I've based this series on those tools and approaches in the order I needed to learn them:
- Getting Started with Perfect: Setting up a basic HTTP Server Perfect app from the command line.
- Templating with Perfect-Mustache (Coming Soon): Add templating to a Perfect app with Perfect-Mustache.
- Parsing Markdown with Perfect-Markdown (Coming Soon): Add Markdown parsing to a Perfect app with Perfect-Markdown.
- Highlighting Syntax with syntaxhighlighter.js (Coming Soon): Add syntax highlighting to a Perfect app with syntaxhighlighter.js.
- Handling 404s with Perfect's HTTPResponseFilter (Coming Soon): Display a custom 404 File Not Found page whenever the server handles a 404.
- Deploying to Digital Ocean via Git (Coming Soon): Setup a Digital Ocean droplet and deploy using Git and Git Hooks.
My first task was to get a Perfect app setup and running on my local machine. I've documented the process in Getting Started with Perfect. Enjoy!