Skip to content

Commit c5e824a

Browse files
authored
Merge pull request #421 from api-platform/staging
MEP
2 parents 26b0f44 + d9c0a41 commit c5e824a

File tree

5 files changed

+47
-43
lines changed

5 files changed

+47
-43
lines changed

pwa/app/sitemap.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ import { getRootUrl } from "utils";
1212

1313
const basePath = getRootUrl();
1414

15+
const addTrailingSlashIfNecessary = (str: string) =>
16+
str.charAt(str.length - 1) === "/" ? str : `${str}/`;
17+
1518
function createLocalePath(locale: Locale, path: string, edition?: string) {
1619
const baseLocalePath =
1720
i18n.defaultLocale === locale ? basePath : `${basePath}/${locale}`;
@@ -54,7 +57,7 @@ async function getAllConRoutes() {
5457
routes.push(createLocalePath(locale, `con/${edition}/${legal}`));
5558
}
5659
}
57-
return routes;
60+
return routes.map((route) => addTrailingSlashIfNecessary(route));
5861
}
5962

6063
async function getAllStandardRoutes() {
@@ -92,13 +95,14 @@ async function getAllStandardRoutes() {
9295
}
9396
}
9497

95-
return routes;
98+
return routes.map((route) => addTrailingSlashIfNecessary(route));
9699
}
97100

98101
export default async function sitemap() {
99102
const allLinks = [
100-
...(await getAllConRoutes()),
103+
basePath,
101104
...(await getAllStandardRoutes()),
105+
...(await getAllConRoutes()),
102106
];
103107
return allLinks.map((path) => ({ url: path }));
104108
}

pwa/components/layout/Nav.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export default function Nav({ withPreheader = false }) {
102102
indexName={process.env.NEXT_PUBLIC_DOCSEARCH_INDEX_NAME}
103103
apiKey={process.env.NEXT_PUBLIC_DOCSEARCH_API_KEY}
104104
searchParameters={{
105-
facetFilters: [`version:v${version}`],
105+
facetFilters: [`version:${version}`],
106106
}}
107107
transformItems={(items: any[]) => {
108108
return items.map((item) => ({

pwa/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"marked": "^5.0.4",
2929
"marked-highlight": "^2.0.1",
3030
"negotiator": "^0.6.3",
31-
"next": "13.4.8-canary.8",
31+
"next": "13.4.9-canary.1",
3232
"next-themes": "npm:@wits/next-themes@^0.2.16",
3333
"octokit": "^2.0.19",
3434
"prettier": "^2.8.8",

pwa/pnpm-lock.yaml

Lines changed: 37 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pwa/styles/common.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
@apply text-sm whitespace-pre-wrap leading-relaxed bg-gray-100 dark:bg-blue-darkest rounded-2xl mt-2 mb-4 overflow-x-auto;
4444
}
4545
.doc pre > code > pre {
46-
@apply p-0 m-0 !bg-transparent;
46+
@apply p-0 m-0 rounded-none !bg-transparent;
4747
}
4848
.doc code {
4949
@apply whitespace-pre-wrap break-words;

0 commit comments

Comments
 (0)