A simple Svelte blog based on Gatsby starter blog CSS styles.
Features:
View the demo blog hosted on Vercel.
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.
Edit posts.json
file in data
. Posts are ordered by id in descending order by default.
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.
Install vercel
if you haven't already:
yarn add -g vercel
Then, from within your project folder:
cd public
vercel deploy --name my-project
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