Skip to content

Commit 999bdca

Browse files
author
Corentin Mors
committed
Fix SEO description and paths
1 parent e5f0a57 commit 999bdca

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

.github/workflows/documentation-deploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
with:
2020
node-version: 16
2121
cache: yarn
22-
cache-dependency-path: 'documentation/yarn.lock'
22+
cache-dependency-path: '**/yarn.lock'
2323

2424
- name: Build
2525
run: |

documentation/theme.config.jsx

+20-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { useRouter } from 'next/router';
2+
import { useConfig } from 'nextra-theme-docs';
23

34
export default {
45
logo: <strong>Dashlane CLI</strong>,
@@ -19,8 +20,26 @@ export default {
1920
const { asPath } = useRouter();
2021
if (asPath !== '/') {
2122
return {
22-
titleTemplate: '%s - Dashlane CLI'
23+
titleTemplate: '%s - Dashlane CLI',
2324
};
2425
}
26+
},
27+
head: () => {
28+
const { asPath, defaultLocale, locale } = useRouter();
29+
const { frontMatter } = useConfig();
30+
const url =
31+
'https://dashlane.github.io/dashlane-cli' +
32+
(defaultLocale === locale ? asPath : `/${locale}${asPath}`);
33+
34+
return (
35+
<>
36+
<meta property="og:url" content={url} />
37+
<meta property="og:title" content={frontMatter.title || 'Dashlane CLI'} />
38+
<meta
39+
property="og:description"
40+
content={frontMatter.description || 'Learn how to access your Dashlane vault and API endpoints from the command line.'}
41+
/>
42+
</>
43+
);
2544
}
2645
};

0 commit comments

Comments
 (0)