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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/docs/src/app/environment-variables/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ You can quickly copy these randomly generated example variables to your `.env.lo
## Environment Variables {{ anchor: false}}

<Properties>
<Property name="NEXT_SITE_URL" type="string">
The URL of your frontend site. <br />
Example: `https://example.com`
</Property>
<Property name="NEXT_PUBLIC_WP_URL" type="string">
The URL of your WordPress site used to fetch the WP REST API. <br />
Example: `https://example-wordpress.com`
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/src/app/packages/nextwp/core/components/page.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const templates = {
special: SpecialPostTemplate,
},
archive:{
post: PostArchiveTemplate,
posts: PostArchiveTemplate,
// custom post type archive
movie: MovieArchiveTemplate,
},
Expand Down
9 changes: 6 additions & 3 deletions apps/docs/src/components/env-code-block.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import { Code, CodeGroup, CodeButton } from '@/components/Code'
import { useEffect, useState } from 'react'

export function EnvCodeBlock() {
const [code, setCode] = useState(`NEXT_PUBLIC_WP_URL=
const [code, setCode] = useState(`NEXT_SITE_URL=
NEXT_PUBLIC_WP_URL=
WP_APPLICATION_PASSWORD=
NEXT_PREVIEW_SECRET=
REVALIDATE_SECRET_KEY=`)
Expand All @@ -22,7 +23,8 @@ REVALIDATE_SECRET_KEY=`)
.map(() => chars[Math.floor(Math.random() * chars.length)])
.join('')

setCode(`NEXT_PUBLIC_WP_URL=
setCode(`NEXT_SITE_URL=
NEXT_PUBLIC_WP_URL=
WP_APPLICATION_PASSWORD=
NEXT_PREVIEW_SECRET={#string}${NEXT_PREVIEW_SECRET}{#}
REVALIDATE_SECRET_KEY={#string}${REVALIDATE_SECRET_KEY}{#}`)
Expand All @@ -40,7 +42,8 @@ REVALIDATE_SECRET_KEY={#string}${REVALIDATE_SECRET_KEY}{#}`)
<>
<CodeButton
onClick={() =>
setCode(`NEXT_PUBLIC_WP_URL=
setCode(`NEXT_SITE_URL=
NEXT_PUBLIC_WP_URL=
WP_APPLICATION_PASSWORD=
NEXT_PREVIEW_SECRET=
REVALIDATE_SECRET_KEY=`)
Expand Down
Loading