https://github.com/one-aalam/svelte-notion-kit
Brings your Notion pages to SvelteKit
https://github.com/one-aalam/svelte-notion-kit
notion notion-api svelte svelte3 sveltekit
Last synced: 2 months ago
JSON representation
Brings your Notion pages to SvelteKit
- Host: GitHub
- URL: https://github.com/one-aalam/svelte-notion-kit
- Owner: one-aalam
- Created: 2021-07-29T09:41:41.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-07-30T16:07:45.000Z (over 3 years ago)
- Last Synced: 2025-01-31T04:31:53.609Z (3 months ago)
- Topics: notion, notion-api, svelte, svelte3, sveltekit
- Language: Svelte
- Homepage: svelte-notion-kit.vercel.app
- Size: 760 KB
- Stars: 35
- Watchers: 5
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-svelte-kit - SvelteKit with Notion
README
# Svelte Notion Kit
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## How to configure Notion?
- Retrieve a `NOTION_TOKEN` by following their [Getting Started guide](https://developers.notion.com/docs/getting-started)
- Create a table as the database of your content, and copy its `id`. Maintain it as `NOTION_DATABASE_ID`
- Add following columns as a post attribute
- `title` (title) - For post title
- `summary` (text) - For post summary
- `tags` (multi-select) - For post tags
- `author` (person) - For post's Author
- `published` (checkbox) - Published? (un-used currently)
![]()
This will setup your Notion table, as the table for your SvelteKit + Notion blog. Congrats!## How to configure the SvelteKit App?
- The `NOTION_TOKEN` and `NOTION_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](https://github.com/sveltejs/kit/tree/master/packages/adapter-vercel) by default. If you want to deploy on Netlify, install [@sveltejs/adapter-netlify](https://github.com/sveltejs/kit/tree/master/packages/adapter-netlify) and change the `adpater` key in `svelte.config.js` to `netlify()
- __Your local instance expects `VITE_` prefixed with the aforementioned environment variables to run.__ Refer `.env.example` for help.