-
V.2.0.0 Based on Astro-paper theme.
-
Notion API as Content Management System base on AstroNot
customized by Pickyzz
- Node.js and npm (or yarn, pnpm, bun)
-
Duplicate [This] Notion template and do not edit the table's name
-
Rename .env.example to .env and add your
NOTION_KEY
key andDATABASE_ID
-
To sync posts for developing use
npm run sync
ornpm run sync:published
-
use
npm run generate
get all published posts and build for production
Run the following command on your local environment:
Then, you can run locally in development mode with live reload:
npm run dev
Open http://localhost:4321 with your favorite browser to see your project.
You can create an optimized production build with:
npm run build
or
npm run generate
Now, your blog is ready to be deployed. All generated files are located at
dist
folder, which you can deploy the folder to any hosting service you
prefer.
Note: run from the root of the project, from a terminal:
Command | Action |
---|---|
npm install |
Installs dependencies |
npm run dev |
Starts local dev server at localhost:3000 |
npm run build |
Build your production site to ./dist/ |
npm run preview |
Preview your build locally, before deploying |
npm run clean |
Remove ./dist folder |
npm run format |
Run ESLint and report styling error |
npm run sync |
Sync all posts from notion database |
npm run sync:publised |
Sync only published post from notion database |
npm run generate |
Sync published post and build static site for deploying |