Editing your Svekyll blog on ExtraStatic.dev

You’ve created your Svekyll blog on ExtraStatic. Now what? How do you add posts to it?

There are a few ways to do that. The “power user” way is to create posts using an editor on your laptop. To do that, you will need to clone the repository, install NodeJS (if you don’t already have this) and then run the app in dev mode which allows you to make changes and see them update in your browser in real time.

(If you want a simpler way to add posts, you can use Creator to create drafts, publish drafts, and access preview pages. You can also create drafts over email. But, this post is about editing on your laptop.)

To start, go to ExtraStatic.dev. If you have not yet forked Svekyll, do that.

Forking Svekll

Once you have it forked, you then need to clone the repository. You will need to have GIT installed to do this. If you don’t yet have that, go here: https://git-scm.com/downloads

Then, clone the repository you just forked inside a terminal.

Clone Svekll

Make sure to use HTTPS, not GIT. SSH+GIT is currently disabled on ExtraStatic.dev.

Then, make sure you have NodeJS installed. If not, install it https://nodejs.org/en/download/. Anything above version 14 is fine.

Once the repository is cloned, run these commands

$ npm install
$ npm run dev

Your blog will then be live, and you can access it at http://localhost:3000!

Unfortunately, at this point, your blog is pretty boring because it has no posts.

Now, add a post. Create a file using whatever editor you want with the name src/routes/2021-11-16-hello.md. You can name it anything you want inside the src/routes directory, either a file with the date, or without the date.

The file contents should be like this:

title: 'Hello from Svekyll'
published: true
description: 'A small note from a new blog'

Hello, my first post

If you go back to http://localhost:3000, you should see that post magically appear. Congratulations, you have made your first post!

To publish this, you will need to run these commands:

$ git add src/routes/2021-11-16-hello.md
$ git commit -m "My first post"
$ git push origin main

Those three commands, if you don’t know git, do this:

  1. Add the post to your working directory in git. Basically, they add the post to a set of changes.
  2. Create a commit for the set of changes with a message.
  3. Push that changeset into ExtraStatic.dev.

Once you do that, ExtraStatic.dev will automatically rebuild your blog. After a minute, you should see your changes live (if you have a URL to your blog, if not, email chris@extrastatic.com)