Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Feb 13, 2024

Conversation

mosesintech
Copy link
Collaborator

This PR will

  • Fix the typo in the WordPressTemplate templates example, from archive: { post: ... } } to archive: { posts: ... } }.
  • add NEXT_SITE_URL to Environment Variables docs.

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

Copy link

vercel bot commented Feb 13, 2024

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

Copy link
Owner

@CalebBarnes CalebBarnes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing, thank you!

@CalebBarnes
Copy link
Owner

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 #26 before changing anything related to the urls.

@CalebBarnes CalebBarnes merged commit 487ca92 into main Feb 13, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants