|
44 | 44 |
|
45 | 45 | - 2b7949bb: - Added support for configuring a custom sitemap index path via the `sitemapIndexPath` option in `getSitemapProps`, enhancing compatibility with plugins like RankMath that modify the default sitemap path. |
46 | 46 |
|
47 | | - |
48 | 47 | ```javascript |
49 | 48 | import { getSitemapProps } from '@faustwp/core'; |
50 | 49 |
|
51 | 50 | export default function Sitemap() {} |
52 | 51 |
|
53 | 52 | export function getServerSideProps(ctx) { |
54 | | - return getSitemapProps(ctx, { |
55 | | - sitemapIndexPath: '/sitemap_index.xml', // RankMath changes the default sitemap path to this |
56 | | - frontendUrl: process.env.NEXT_PUBLIC_SITE_URL, |
57 | | - sitemapPathsToIgnore: ['/wp-sitemap-users-*'], |
58 | | - }); |
| 53 | + return getSitemapProps(ctx, { |
| 54 | + sitemapIndexPath: '/sitemap_index.xml', // RankMath changes the default sitemap path to this |
| 55 | + frontendUrl: process.env.NEXT_PUBLIC_SITE_URL, |
| 56 | + sitemapPathsToIgnore: ['/wp-sitemap-users-*'], |
| 57 | + }); |
59 | 58 | } |
60 | 59 | ``` |
61 | 60 |
|
|
159 | 158 |
|
160 | 159 | ```jsx |
161 | 160 | <ToolbarItem onKeyDown={handleKeyDown} onClick={handleClick}> |
162 | | - Log Out |
| 161 | + Log Out |
163 | 162 | </ToolbarItem> |
164 | 163 | ``` |
165 | 164 |
|
|
265 | 264 | import { FaustPage } from '@faustwp/core'; |
266 | 265 |
|
267 | 266 | type GetPageData = { |
268 | | - generalSettings: { |
269 | | - title: string; |
270 | | - }; |
| 267 | + generalSettings: { |
| 268 | + title: string; |
| 269 | + }; |
271 | 270 | }; |
272 | 271 |
|
273 | 272 | type PageProps = { |
274 | | - myProp: string; |
| 273 | + myProp: string; |
275 | 274 | }; |
276 | 275 |
|
277 | 276 | const Page: FaustPage<GetPageData, PageProps> = (props) => { |
278 | | - const { myProp, data } = props; |
279 | | - return <></>; |
| 277 | + const { myProp, data } = props; |
| 278 | + return <></>; |
280 | 279 | }; |
281 | 280 | ``` |
282 | 281 |
|
|
345 | 344 | export default function Sitemap() {} |
346 | 345 |
|
347 | 346 | export function getServerSideProps(context) { |
348 | | - return getSitemapProps(context, { |
349 | | - frontendUrl: process.env.FRONTEND_URL, // Set the FRONTEND_URL as an env var |
350 | | - }); |
| 347 | + return getSitemapProps(context, { |
| 348 | + frontendUrl: process.env.FRONTEND_URL, // Set the FRONTEND_URL as an env var |
| 349 | + }); |
351 | 350 | } |
352 | 351 | ``` |
353 | 352 |
|
|
377 | 376 | import { FaustHooks, FaustPlugin } from '@faustwp/core'; |
378 | 377 |
|
379 | 378 | export class MyPlugin implements FaustPlugin { |
380 | | - apply(hooks: FaustHooks) {} |
| 379 | + apply(hooks: FaustHooks) {} |
381 | 380 | } |
382 | 381 | ``` |
383 | 382 |
|
|
0 commit comments