-
Notifications
You must be signed in to change notification settings - Fork 3
docs: Update sitemaps docs for other wp plugins #251
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -70,3 +70,23 @@ export function getServerSideProps(ctx) { | |
| ``` | ||
|
|
||
| Run the dev server again and visit the sitemap URL. You now have WordPress content and Next.js content in your Faust app. | ||
|
|
||
| ## 4. Changing the sitemap URL for other WordPress SEO plugins | ||
|
|
||
| If you wanted to use a different sitemap than the one that comes out of the box with WordPress this is possible with Faust for other WordPress SEO plugins like Rank Math or Yoast SEO. | ||
|
||
|
|
||
| You just need to update the argument for `sitemapIndexPath` to point to the plugins sitemap URL. | ||
|
||
|
|
||
| e.g. for Rank Math: | ||
|
||
|
|
||
| ```js title="pages/sitemap.xml.js" | ||
|
||
| import { getSitemapProps } from "@faustwp/core"; | ||
| export default function Sitemap() {} | ||
|
|
||
| export function getServerSideProps(ctx) { | ||
| return getSitemapProps(ctx, { | ||
| sitemapIndexPath: "sitemap_index.xml", | ||
| frontendUrl: process.env.FRONTEND_URL, | ||
| }); | ||
| } | ||
| ``` | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change this section header to fit the page better with the link icon to this :
## 4. Changing the sitemap URL for other WP SEO plugins