CalebBarnes / nextwp

http://nextwp.org/
7 stars 0 forks source link

Docs: fix typos and add NEXT_SITE_URL to env variables #51

Closed mosesintech closed 5 months ago

mosesintech commented 5 months ago

This PR will

Issue:

Without the NEXT_SITE_URL, if devs have followed the docs for adding @nextwp/core to their project they will receive the following error:

 ⨯ Internal error: Error: No NEXT_SITE_URL provided. Please set NEXT_SITE_URL env
Screen Shot 2024-02-12 at 6 36 37 PM
vercel[bot] commented 5 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
next-wordpress-starter ✅ Ready (Inspect) Visit Preview Feb 13, 2024 0:41am
nextwp-docs ✅ Ready (Inspect) Visit Preview Feb 13, 2024 0:41am
CalebBarnes commented 5 months ago

Also, right now we are using NEXT_SITE_URL in some functions like the sitemap urls, menu items, archive urls, etc, but I plan on removing the need for this. For now we should definitely have that documented though!

Ideally we can just detect the frontend url from Netlify or Vercel, and if it is deployed elsewhere then this one could override it.

Will also consider https://github.com/CalebBarnes/nextwp/issues/26 before changing anything related to the urls.