https://github.com/Charca/sapper-blog-template
Markdown-based Blog Built with Sapper
https://github.com/Charca/sapper-blog-template
Last synced: 11 months ago
JSON representation
Markdown-based Blog Built with Sapper
- Host: GitHub
- URL: https://github.com/Charca/sapper-blog-template
- Owner: Charca
- License: mit
- Created: 2019-06-04T22:52:41.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T23:25:23.000Z (over 3 years ago)
- Last Synced: 2023-11-07T17:32:52.272Z (over 2 years ago)
- Language: CSS
- Homepage:
- Size: 7 MB
- Stars: 179
- Watchers: 4
- Forks: 64
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sapper-blog-template
A starter template for building markdown-powered blogs with [Sapper](https://github.com/sveltejs/sapper) and [Svelte](https://github.com/sveltejs/svelte).
### 👉 [Demo](https://sapper-blog-template.netlify.com/)
## ✨ Getting started
```bash
npx degit Charca/sapper-blog-template my-blog
cd my-blog
npm install # or yarn!
npm run dev
```
Open up [localhost:3000](http://localhost:3000) and start clicking around.
Consult [sapper.svelte.dev](https://sapper.svelte.dev) for help getting started.
## 🏗 Structure
The base structure of this template is the same as Sapper's [default template](https://github.com/sveltejs/sapper-template/). These are some of the new things you'll find here:
### src/routes/blog
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.
### src/routes/blog/posts
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.
- The markdown file name becomes the post slug. For example `hello-world.md` becomes `http://localhost:3000/blog/hello-world`.
- Everything between the start of the post and the `` tag becomes the article's "excerpt".
- Frontmatter properties supported are `title` and `date`.
## 🚀 Deploy
[](https://app.netlify.com/start/deploy?repository=https://github.com/Charca/sapper-blog-template)
## 🐛 Bugs and feedback
Sapper is in early development, and may have the odd rough edge here and there. Please be vocal over on the [Sapper issue tracker](https://github.com/sveltejs/sapper/issues).