The website and blog for Kim Thompson, React developer by day and Svelte afficionado by night.
Once you pull down this repo and install the packages with npm i
, about the only command you should need is
npm run dev
This will run a development version of the site with HMR at http://localhost:3000. If you're curious about other commands or the rollup settings used here, you can check out the package.json
and rollup.config.js
files.
First, create an account with https://vercel.com and install the Vercel package globally.
npm i -g vercel
Then use this nice little tool to automatically generate the vercel.json
configuration you'll need for Sapper.
npx vercel-sapper
Finally, run the command vercel
and follow the prompts. Log in and verify your email if it asks you to. You can then also set up this site to build and deploy automatically in Vercel every time you push to the master branch.
I got this blog template from Maxi Ferreira, and you can find it here
The base structure of this template is the same as Sapper's default template. These are some of the new things you'll find here:
This is the home of your blog. The most important files in here are:
_posts.js
: this module contains the logic for loading and parsing your markdown posts.[slug].svelte
: this is the template of your blog post page.index.svelte
: this is the template of your article list page.This is where your markdown posts live in. All .md
files in this directory are treated as blog posts and parsed automatically by the _posts.js
module.
hello-world.md
becomes http://localhost:3000/blog/hello-world
.<!-- more -->
tag becomes the article's "excerpt".title
and date
.Sapper is in early development, and may have the odd rough edge here and there. Please be vocal over on the Sapper issue tracker.