Comments (6)
Hey @tiulpin, I think I fixed the issue now in 509e263.
I also switched the URL mapping around, so it's now what you originally requested:
{
pageUrlOverrides: {
'/foo': '067dd719a912471ea9a3ac10710e7fdf',
'/bar': '0be6efce9daf42688f65c76b89f8eb27'
}
}
from nextjs-notion-starter-kit.
Added in b50d21c.
{
pageUrlOverrides: {
'067dd719a912471ea9a3ac10710e7fdf': '/foo',
'0be6efce9daf42688f65c76b89f8eb27': '/bar'
}
}
Note that site.config.js
is a JS file, so if you want to store this mapping in a separate JSON file so it's easy to generate, that's really easy. Just do:
// top of site.config.js
const pageUrlOverrides = require('./page-overrides.json')
// and then use pageUrlOverrides in your config
from nextjs-notion-starter-kit.
Should be very easy to setup; would you mind explaining your ideal use case a bit more in-depth so I can generalize it and add it to the repo?
from nextjs-notion-starter-kit.
My ideal use case: to have this map in a separate JSON, e.g. .map.json
{
"about": "78fc5a4b88d74b0e824e29407e9f1ec1",
"subscribe": "4e29407e9f1ec178fc5a4b88d74b0e",
"socials": "b88d74b0e824e29b88d74b0e824e2"
}
Or just the same thing declared in site.config.js
(but with the separated JSON it will be easier to parse with any tool)
from nextjs-notion-starter-kit.
@tiulpin feel free to re-open if you run into any issues. The logic around mapping UUIDs and non-UUIDs is a bit error-prone in places, but I tried to make it pretty robust against invalid inputs.
from nextjs-notion-starter-kit.
Thanks for the updates, the configuration works (forked the repo and edited the config here, but URLs are not overridden on generated pages
How to reproduce
- open the first link on https://experimenthoot.vercel.app
- see https://experimenthoot.vercel.app/5e528592a3ea4bef9253b7ddce6f0c62
- https://experimenthoot.vercel.app/about works if open directly, is it possible to redirect to that page?
from nextjs-notion-starter-kit.
Related Issues (20)
- External Link Preview fails: google drive link HOT 1
- Error: Something went wrong installing the "sharp" module HOT 6
- to Lower Case error
- Continuous Build and Deployment Challenges in Next.js Notion Project
- Limit fetch to teamspace or rootNotionPageId children HOT 4
- Discourse as Comment System
- Is there any possible method that it can display 2 different gallery in blog page & the tag can be link
- How to add TOC in the mobile phone
- Multilingual per post instead of per site?
- Is it possible to generate OGP Image that the size lower than 1MB? HOT 1
- 45 Minute
- Even non-existent pages return 200 OK http status code
- How to display the time create by "Date or reminder"?
- Bug: Publish date on website homepage is one month earlier than specified in Notion database, when it is set to be the first day of any month HOT 2
- After using Vervel to build, the Search function fails
- AWS Amplify has an error in deployment HOT 3
- Fix Font size
- Configure site.config.ts with env variables
- [Question] Og image is empty when sharing url link
- Clicking on search causes an Internal Server Error HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nextjs-notion-starter-kit.