Boilerplate to quckly get up and running with Svelte and Notion, with
- Typescript as the language choice
- Tailwind CSS for quick styling without getting out of your HTML
- ESLint for static code analysis
- Prettier for code formatting
- SEO pre-configured
- Icons support out of the box
- Retrieve a
NOTION_TOKEN
by following their Getting Started guide - Create a table as the database of your content, and copy its
id
. Maintain it asNOTION_DATABASE_ID
- Add following columns as a post attribute
title
(title) - For post titlesummary
(text) - For post summarytags
(multi-select) - For post tagsauthor
(person) - For post's Authorpublished
(checkbox) - Published? (un-used currently)
- The
NOTION_TOKEN
andNOTION_DATABASE_ID
is expected to be available in your Vercel/Netlify account as environment variables. Add them, fork the project and deploy on Vercel. - The project uses the @sveltejs/adapter-vercel by default. If you want to deploy on Netlify, install @sveltejs/adapter-netlify and change the
adpater
key insvelte.config.js
to `netlify() - Your local instance expects
VITE_
prefixed with the aforementioned environment variables to run. Refer.env.example
for help.