Giter VIP home page Giter VIP logo

Comments (6)

transitive-bullshit avatar transitive-bullshit commented on August 27, 2024 3

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.

transitive-bullshit avatar transitive-bullshit commented on August 27, 2024 1

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.

transitive-bullshit avatar transitive-bullshit commented on August 27, 2024

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.

tiulpin avatar tiulpin commented on August 27, 2024

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.

transitive-bullshit avatar transitive-bullshit commented on August 27, 2024

@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.

tiulpin avatar tiulpin commented on August 27, 2024

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

from nextjs-notion-starter-kit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.