stephenou / fruitionsite

Build your website with Notion for free
https://fruitionsite.com
MIT License
1.6k stars 223 forks source link

How to set up multiple pages under the same domain? #84

Open alexTMGH opened 3 years ago

alexTMGH commented 3 years ago

I'm not clear on how to set up multiple pages under the same domain.

Let's say you've already set up www.domain.com. You have additional Notion pages for which you want the URLs to be www.domain.com/page1, www.domain.com/page2, www.domain.com/page3, etc.. How do you go about doing this?

Separately, I just set up my domain using the instructions. Everything seemed to go smoothly, but I'm now trying to visit my site, and I'm getting this error message...https://d.pr/i/QzHfQu. What did I do wrong? I've copied and pasted the code below.


/ CONFIGURATION STARTS HERE /

/ Step 1: enter your domain name like fruitionsite.com / const MY_DOMAIN = 'fsdelight.com';

/*

JECaballeroR commented 3 years ago

@alexTMGH Modify the SLUG_TO_PAGE constant, like this:

const SLUG_TO_PAGE = {
  '': 'fd9c46bf6e8b40b88351d660a9d35570',
   'page1': "the letters and numbers of page1",
   'page2': "the letters and numbers of page2"
};
juniahn-dev commented 5 months ago

@JECaballeroR Hi! I have some question. I created a page in modal format in Notion, but when I call it, the URL appears as a querystring. How can I resolve this?