This repo is being archived as sveltekit should be used in favor of sapper as of this writing.
An expansion of the default Sapper template in the following ways:
content/posts
content/pages
degit
degit
is a scaffolding tool that lets you create a directory from a branch in a repository. Use either the rollup
or webpack
branch in sapper-template
:
npx degit "edm00se/sapper-md-netlify-cms-starter" my-app
Alternatively, you can use GitHub's template feature with the sapper-template-rollup repository.
However you get the code, you can install dependencies and run the project in development mode with:
cd my-app
npm install
npm run dev
Open up localhost:3000 and start clicking around.
Consult sapper.svelte.dev for help getting started.
You should at a minimum update:
name
and description
fields in package.json
backend
's repo
and branch
fields in static/admin/config.yml
to ensure the netlify cms changes go the correct destinationsiteUrl
and siteTitle
in src/stores/_config.js
Sapper expects to find three directories in the root of your project — src
, static
, and content
. The content
directory contains pages and blog posts in markdown files in their respective sub-directories, static
is any static assets that need to be served, and src
contains the majority of the sapper application.
src/
Of note:
siteUrl
in src/stores/_config.js
src/routes/blog/
src/routes/
, other than the home page (index.svelte
), are generated via [slug].json.js
and [slug].svelte
This Sapper starter uses Rollup to provide code-splitting and dynamic imports, as well as compiling your Svelte components.
As it exists in this repo, you can export with npm run export
and publish the contents of __sapper__/export
.
MIT