Skip to content

Commit

Permalink
update docs to fix typos and add env variable
Browse files Browse the repository at this point in the history
  • Loading branch information
mosesintech committed Feb 13, 2024
1 parent f80a373 commit c1fe384
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
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

0 comments on commit c1fe384

Please sign in to comment.