Skip to content
Merged
Changes from 1 commit
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
20 changes: 20 additions & 0 deletions src/pages/docs/how-to/sitemaps/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Contributor

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


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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider restructuring the paragraph to this and linking the plugins to their respective pages:

"If you prefer to use a different sitemap instead of the default one provided by WordPress, Faust allows integration with 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.
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider changing this sentence to this:

"Simply update the sitemapIndexPath argument to point to the plugin's sitemap URL."


e.g. for Rank Math:
Copy link
Contributor

Choose a reason for hiding this comment

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

Change this to the sentence below to this:

"Here is an example for the Rank Math plugin:"


```js title="pages/sitemap.xml.js"
Copy link
Contributor

Choose a reason for hiding this comment

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

Highlight the arg that you want the reader to focus on:

Copy link
Contributor

Choose a reason for hiding this comment

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

@colinmurphy I don't know why GH is not showing the line of MDX but this is what I am suggesting:

js {6} title="pages/sitemap.xml.js"

Copy link
Member Author

@colinmurphy colinmurphy Jan 30, 2025

Choose a reason for hiding this comment

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

Thanks @Fran-A-Dev

That i s a really good tip. I never knew you could do that so thank you 😄

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,
});
}
```