{"repo":"subhendupsingh/sveltekit-notion-blog","free":true,"listed":false,"github":"https://github.com/subhendupsingh/sveltekit-notion-blog","clone":"git clone https://github.com/subhendupsingh/sveltekit-notion-blog.git","description":"A plug and play library for setting up blogs in subdirectory or main directory in Sveltekit projects using Notion as CMS.","language":"TypeScript","stars":43,"topics":["cms","notion","notion-api","notion-blog","svelte","sveltejs","sveltekit","svelte4"],"license":null,"category":"saas-starters-boilerplates","readme_excerpt":"Introduction This is a plug and play library for Sveltekit projects to create blogs quickly in your website's subdirectory using Notion as a CMS. Getting started Notion Setup 1. Duplicate this Notion template into your workspace. 2. Create an internal Notion connection from the settings (Link) , Notion's documentation on how to create an internal connection [ (link) ] (https://developers.notion.com/docs/create-a-notion-integration) 3. Connect the newly created connection with the blogs template duplicated in step 1 by clicking on the 3 dots on top-right. Then click on Add Connections and search for the connection you created in the step 3. Done! 4. New blogs will be added in the Blogs page of the template. Get database id of your blogs from Notion 1. Click on the Copy link to view option and copy the URL 2. In the link Initialize the library in the root +layout.ts Code Setup Add this to your vite.config.ts 1. Install the package 2. In your existing project, create a subdirectory names blog and create and files in this directory and call the getAllPosts method in the 3. In the , import the bash import type { PageData } from './$types'; import { PostsList } from \"sveltekit-notion-blog\"; export let data: PageData; +page.svelte +page.server.ts +page.server.ts bash import type { ServerLoadEvent } from '@sveltejs/kit'; import { getBlogPageBySlug } from 'sveltekit-notion-blog'; export const load = (event: ServerLoadEvent) = getBlogPageBySlug(event); +page.svelte bash import { BlogPo","default_branch":null,"files":null,"tree":[],"storefront":"/r/subhendupsingh","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/subhendupsingh/sveltekit-notion-blog/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}