Skip to content

Commit 5441482

Browse files
Merge pull request #594 from onnimonni/document-fix-for-social-media-preview-images
2 parents 9ebeda7 + d476e81 commit 5441482

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

readme.md

+11
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ This project requires a recent version of Node.js (we recommend >= 16).
4747
3. `npm install`
4848
4. `npm run dev` to test locally
4949
5. `npm run deploy` to deploy to vercel 💪
50+
6. ❗Disable **Deployment Protection** setting in Vercel Web Dashboard ❗ ([See more below](#vercel-configuration))
5051

5152
I tried to make configuration as easy as possible — All you really need to do to get started is edit `rootNotionPageId`.
5253

@@ -58,6 +59,16 @@ In order to find your Notion workspace ID (optional), just load any of your site
5859

5960
I recommend setting up a collection on your home page that contains all of your articles / projects / content. There are no structural constraints on your Notion workspace, however, so feel free to add content as you normally would in Notion.
6061

62+
### Vercel Configuration
63+
#### Enabling social media preview images
64+
**❗❗❗Social media preview images won't work by default in Vercel❗❗❗**
65+
66+
👉 You need Login to Vercel Dashboard and **disable Vercel Authentication** from `Project -> Settings -> Deployment Protection`.
67+
68+
![How to disable Vercel Deployment Protection setting](https://github.com/user-attachments/assets/a1eb5a1f-da7a-497e-b4f6-f7e851a6cd8a "How to disable Vercel Deployment Protection setting which causes social media preview image endpoint to return 401 Unauthorized")
69+
70+
💡 If you forget to do this your site will return `401 Unauthorized` responses when crawlers are trying to retrieve the images
71+
6172
## URL Paths
6273

6374
The app defaults to slightly different URL paths in dev vs prod (though pasting any dev pathname into prod will work and vice-versa).

0 commit comments

Comments
 (0)