You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+43-2
Original file line number
Diff line number
Diff line change
@@ -57,14 +57,55 @@ cd Blog
57
57
npm install
58
58
```
59
59
60
-
4. Start the development server:
60
+
4. Set up environment variables:
61
+
62
+
Copy the `.env.example` file to `.env`:
61
63
62
64
```
63
-
npm run dev
65
+
cp .env.example .env
64
66
```
67
+
Then, fill in the environment variables in the `.env` file:
68
+
69
+
-`NOTION_DATABASE_ID`: Your Notion database ID.
70
+
-`NOTION_AUTH_TOKEN`: Your Notion authentication token.
71
+
-`API_SECRET`: Choose any secure password for route handler authentication.
72
+
-`SITE_URL`: The URL of your website.
73
+
74
+
#### For Development:
75
+
76
+
Set `SITE_URL` to `http://localhost:3000` during development.
77
+
78
+
#### For Production:
79
+
80
+
Set `SITE_URL` to your production website URL. Ensure it starts with `https://` for secure connections.
81
+
82
+
5. Setting Up Notion Integration
83
+
84
+
To integrate your Notion content with this blog website, follow these steps:
85
+
86
+
I. **Duplicate Notion Blog Template**: Find and duplicate the blog template you want to use in your Notion workspace.
87
+
88
+
II. **Retrieve Notion Database ID**: Open the duplicated template, and copy the string of characters from the URL after `Blog-`. This string is your Notion database ID.
65
89
90
+
III. **Publish Notion Page**: Ensure that the Notion page containing your blog content is published by clicking on the "Share" button and selecting "Publish."
91
+
92
+
IV. **Obtain Notion Authentication Token**: While logged into Notion, right-click anywhere on the page, select "Inspect," navigate to the "Application" tab, and find the `token_v2` cookie. Copy its value.
93
+
94
+
6. Start the development server:
95
+
96
+
```
97
+
npm run dev
98
+
```
66
99
Open http://localhost:3000 in your browser to view the website.
67
100
101
+
7. Build and run for production:
102
+
103
+
When you're ready to deploy your portfolio:
104
+
```
105
+
npm run build
106
+
npm run start
107
+
```
108
+
68
109
## Contributions
69
110
70
111
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
0 commit comments