svelb

A simple Svelte blog based on Gatsby starter blog CSS styles.

Features:

  • JSON-based post data with HTML support
  • Syntax highlight
  • Pagination

Demo

View the demo blog hosted on Vercel.

Get started

Clone the project and install the dependencies...

cd svelb
yarn install

...then start Rollup:

yarn dev

Navigate to localhost:8080. You should see the blog running. Edit a component file in src, save it, and reload the page to see your changes.

Usage

Edit posts.json file in data. Posts are ordered by id in descending order by default.

Building and running in production mode

To create an optimised version of the blog:

yarn build

You can run the newly built app with yarn start. This uses sirv, which is included in your package.json's dependencies so that the app will work when you deploy to platforms like Heroku.

Deploying to the web

With Vercel

Install vercel if you haven't already:

yarn add -g vercel

Then, from within your project folder:

cd public
vercel deploy --name my-project

With surge

Install surge if you haven't already:

yarn add -g surge

Then, from within your project folder:

npm run build
surge public my-project.surge.sh

License

MIT License

Top categories

svelte logo

Want a Svelte site built?

Hire a Svelte developer
Loading Svelte Themes