@docusaurus/theme-classic 0.0.0-4736 → 0.0.0-4739

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/lib/theme-classic.d.ts +5 -33
  2. package/lib-next/theme/BlogArchivePage/index.js +13 -9
  3. package/lib-next/theme/BlogListPage/index.js +34 -13
  4. package/lib-next/theme/BlogPostPage/index.js +56 -45
  5. package/lib-next/theme/BlogTagsListPage/index.js +16 -12
  6. package/lib-next/theme/BlogTagsPostsPage/index.js +40 -33
  7. package/lib-next/theme/DocCategoryGeneratedIndexPage/index.js +27 -6
  8. package/lib-next/theme/DocItem/index.js +78 -63
  9. package/lib-next/theme/DocPage/index.js +85 -77
  10. package/lib-next/theme/DocPage/styles.module.css +0 -4
  11. package/lib-next/theme/DocTagDocListPage/index.js +38 -31
  12. package/lib-next/theme/DocTagsListPage/index.js +21 -16
  13. package/lib-next/theme/Layout/index.js +15 -10
  14. package/lib-next/theme/MDXPage/index.js +32 -26
  15. package/lib-next/theme/NotFound.js +38 -33
  16. package/lib-next/theme/{LayoutHead → SiteMetadata}/index.js +11 -26
  17. package/package.json +13 -13
  18. package/src/theme/BlogArchivePage/index.tsx +13 -9
  19. package/src/theme/BlogListPage/index.tsx +32 -13
  20. package/src/theme/BlogPostPage/index.tsx +55 -48
  21. package/src/theme/BlogTagsListPage/index.tsx +16 -12
  22. package/src/theme/BlogTagsPostsPage/index.tsx +39 -32
  23. package/src/theme/DocCategoryGeneratedIndexPage/index.tsx +31 -4
  24. package/src/theme/DocItem/index.tsx +65 -52
  25. package/src/theme/DocPage/index.tsx +85 -77
  26. package/src/theme/DocPage/styles.module.css +0 -4
  27. package/src/theme/DocTagDocListPage/index.tsx +38 -30
  28. package/src/theme/DocTagsListPage/index.tsx +21 -16
  29. package/src/theme/Layout/index.tsx +15 -10
  30. package/src/theme/MDXPage/index.tsx +32 -26
  31. package/src/theme/NotFound.tsx +38 -33
  32. package/src/theme/{LayoutHead → SiteMetadata}/index.tsx +11 -25
  33. package/src/theme-classic.d.ts +5 -33
  34. package/lib-next/theme/Seo/index.js +0 -40
  35. package/src/theme/Seo/index.tsx +0 -49
@@ -29,6 +29,7 @@ import {
29
29
  useDocsSidebar,
30
30
  DocsVersionProvider,
31
31
  } from '@docusaurus/theme-common';
32
+ import SearchMetadata from '@theme/SearchMetadata';
32
33
 
33
34
  type DocPageContentProps = {
34
35
  readonly currentDocRoute: DocumentRoute;
@@ -56,87 +57,89 @@ function DocPageContent({
56
57
  }, [hiddenSidebar]);
57
58
 
58
59
  return (
59
- <Layout
60
- wrapperClassName={ThemeClassNames.wrapper.docsPages}
61
- pageClassName={ThemeClassNames.page.docsDocPage}
62
- searchMetadata={{
63
- version,
64
- tag: docVersionSearchTag(pluginId, version),
65
- }}>
66
- <div className={styles.docPage}>
67
- <BackToTopButton />
60
+ <>
61
+ <SearchMetadata
62
+ version={version}
63
+ tag={docVersionSearchTag(pluginId, version)}
64
+ />
65
+ <Layout>
66
+ <div className={styles.docPage}>
67
+ <BackToTopButton />
68
68
 
69
- {sidebar && (
70
- <aside
71
- className={clsx(
72
- ThemeClassNames.docs.docSidebarContainer,
73
- styles.docSidebarContainer,
74
- hiddenSidebarContainer && styles.docSidebarContainerHidden,
75
- )}
76
- onTransitionEnd={(e) => {
77
- if (
78
- !e.currentTarget.classList.contains(styles.docSidebarContainer!)
79
- ) {
80
- return;
81
- }
69
+ {sidebar && (
70
+ <aside
71
+ className={clsx(
72
+ ThemeClassNames.docs.docSidebarContainer,
73
+ styles.docSidebarContainer,
74
+ hiddenSidebarContainer && styles.docSidebarContainerHidden,
75
+ )}
76
+ onTransitionEnd={(e) => {
77
+ if (
78
+ !e.currentTarget.classList.contains(
79
+ styles.docSidebarContainer!,
80
+ )
81
+ ) {
82
+ return;
83
+ }
82
84
 
83
- if (hiddenSidebarContainer) {
84
- setHiddenSidebar(true);
85
- }
86
- }}>
87
- <DocSidebar
88
- key={
89
- // Reset sidebar state on sidebar changes
90
- // See https://github.com/facebook/docusaurus/issues/3414
91
- sidebarName
92
- }
93
- sidebar={sidebar}
94
- path={currentDocRoute.path}
95
- onCollapse={toggleSidebar}
96
- isHidden={hiddenSidebar}
97
- />
85
+ if (hiddenSidebarContainer) {
86
+ setHiddenSidebar(true);
87
+ }
88
+ }}>
89
+ <DocSidebar
90
+ key={
91
+ // Reset sidebar state on sidebar changes
92
+ // See https://github.com/facebook/docusaurus/issues/3414
93
+ sidebarName
94
+ }
95
+ sidebar={sidebar}
96
+ path={currentDocRoute.path}
97
+ onCollapse={toggleSidebar}
98
+ isHidden={hiddenSidebar}
99
+ />
98
100
 
99
- {hiddenSidebar && (
100
- <div
101
- className={styles.collapsedDocSidebar}
102
- title={translate({
103
- id: 'theme.docs.sidebar.expandButtonTitle',
104
- message: 'Expand sidebar',
105
- description:
106
- 'The ARIA label and title attribute for expand button of doc sidebar',
107
- })}
108
- aria-label={translate({
109
- id: 'theme.docs.sidebar.expandButtonAriaLabel',
110
- message: 'Expand sidebar',
111
- description:
112
- 'The ARIA label and title attribute for expand button of doc sidebar',
113
- })}
114
- tabIndex={0}
115
- role="button"
116
- onKeyDown={toggleSidebar}
117
- onClick={toggleSidebar}>
118
- <IconArrow className={styles.expandSidebarButtonIcon} />
119
- </div>
120
- )}
121
- </aside>
122
- )}
123
- <main
124
- className={clsx(
125
- styles.docMainContainer,
126
- (hiddenSidebarContainer || !sidebar) &&
127
- styles.docMainContainerEnhanced,
128
- )}>
129
- <div
101
+ {hiddenSidebar && (
102
+ <div
103
+ className={styles.collapsedDocSidebar}
104
+ title={translate({
105
+ id: 'theme.docs.sidebar.expandButtonTitle',
106
+ message: 'Expand sidebar',
107
+ description:
108
+ 'The ARIA label and title attribute for expand button of doc sidebar',
109
+ })}
110
+ aria-label={translate({
111
+ id: 'theme.docs.sidebar.expandButtonAriaLabel',
112
+ message: 'Expand sidebar',
113
+ description:
114
+ 'The ARIA label and title attribute for expand button of doc sidebar',
115
+ })}
116
+ tabIndex={0}
117
+ role="button"
118
+ onKeyDown={toggleSidebar}
119
+ onClick={toggleSidebar}>
120
+ <IconArrow className={styles.expandSidebarButtonIcon} />
121
+ </div>
122
+ )}
123
+ </aside>
124
+ )}
125
+ <main
130
126
  className={clsx(
131
- 'container padding-top--md padding-bottom--lg',
132
- styles.docItemWrapper,
133
- hiddenSidebarContainer && styles.docItemWrapperEnhanced,
127
+ styles.docMainContainer,
128
+ (hiddenSidebarContainer || !sidebar) &&
129
+ styles.docMainContainerEnhanced,
134
130
  )}>
135
- {children}
136
- </div>
137
- </main>
138
- </div>
139
- </Layout>
131
+ <div
132
+ className={clsx(
133
+ 'container padding-top--md padding-bottom--lg',
134
+ styles.docItemWrapper,
135
+ hiddenSidebarContainer && styles.docItemWrapperEnhanced,
136
+ )}>
137
+ {children}
138
+ </div>
139
+ </main>
140
+ </div>
141
+ </Layout>
142
+ </>
140
143
  );
141
144
  }
142
145
 
@@ -161,7 +164,12 @@ export default function DocPage(props: Props): JSX.Element {
161
164
  : null;
162
165
 
163
166
  return (
164
- <HtmlClassNameProvider className={versionMetadata.className}>
167
+ <HtmlClassNameProvider
168
+ className={clsx(
169
+ ThemeClassNames.wrapper.docsPages,
170
+ ThemeClassNames.page.docsDocPage,
171
+ versionMetadata.className,
172
+ )}>
165
173
  <DocsVersionProvider version={versionMetadata}>
166
174
  <DocsSidebarProvider sidebar={sidebar ?? null}>
167
175
  <DocPageContent
@@ -10,10 +10,6 @@
10
10
  --doc-sidebar-hidden-width: 30px;
11
11
  }
12
12
 
13
- :global(.docs-wrapper) {
14
- display: flex;
15
- }
16
-
17
13
  .docPage,
18
14
  .docMainContainer {
19
15
  display: flex;
@@ -9,10 +9,17 @@ import React from 'react';
9
9
 
10
10
  import Layout from '@theme/Layout';
11
11
  import Link from '@docusaurus/Link';
12
- import {ThemeClassNames, usePluralForm} from '@docusaurus/theme-common';
12
+ import {
13
+ PageMetadata,
14
+ HtmlClassNameProvider,
15
+ ThemeClassNames,
16
+ usePluralForm,
17
+ } from '@docusaurus/theme-common';
13
18
  import type {PropTagDocListDoc} from '@docusaurus/plugin-content-docs';
14
19
  import Translate, {translate} from '@docusaurus/Translate';
15
20
  import type {Props} from '@theme/DocTagDocListPage';
21
+ import SearchMetadata from '@theme/SearchMetadata';
22
+ import clsx from 'clsx';
16
23
 
17
24
  // Very simple pluralization: probably good enough for now
18
25
  function useNDocsTaggedPlural() {
@@ -55,35 +62,36 @@ export default function DocTagDocListPage({tag}: Props): JSX.Element {
55
62
  );
56
63
 
57
64
  return (
58
- <Layout
59
- title={title}
60
- wrapperClassName={ThemeClassNames.wrapper.docsPages}
61
- pageClassName={ThemeClassNames.page.docsTagDocListPage}
62
- searchMetadata={{
63
- // assign unique search tag to exclude this page from search results!
64
- tag: 'doc_tag_doc_list',
65
- }}>
66
- <div className="container margin-vert--lg">
67
- <div className="row">
68
- <main className="col col--8 col--offset-2">
69
- <header className="margin-bottom--xl">
70
- <h1>{title}</h1>
71
- <Link href={tag.allTagsPath}>
72
- <Translate
73
- id="theme.tags.tagsPageLink"
74
- description="The label of the link targeting the tag list page">
75
- View All Tags
76
- </Translate>
77
- </Link>
78
- </header>
79
- <section className="margin-vert--lg">
80
- {tag.docs.map((doc) => (
81
- <DocItem key={doc.id} doc={doc} />
82
- ))}
83
- </section>
84
- </main>
65
+ <HtmlClassNameProvider
66
+ className={clsx(
67
+ ThemeClassNames.wrapper.docsPages,
68
+ ThemeClassNames.page.docsTagDocListPage,
69
+ )}>
70
+ <PageMetadata title={title} />
71
+ <SearchMetadata tag="doc_tag_doc_list" />
72
+ <Layout>
73
+ <div className="container margin-vert--lg">
74
+ <div className="row">
75
+ <main className="col col--8 col--offset-2">
76
+ <header className="margin-bottom--xl">
77
+ <h1>{title}</h1>
78
+ <Link href={tag.allTagsPath}>
79
+ <Translate
80
+ id="theme.tags.tagsPageLink"
81
+ description="The label of the link targeting the tag list page">
82
+ View All Tags
83
+ </Translate>
84
+ </Link>
85
+ </header>
86
+ <section className="margin-vert--lg">
87
+ {tag.docs.map((doc) => (
88
+ <DocItem key={doc.id} doc={doc} />
89
+ ))}
90
+ </section>
91
+ </main>
92
+ </div>
85
93
  </div>
86
- </div>
87
- </Layout>
94
+ </Layout>
95
+ </HtmlClassNameProvider>
88
96
  );
89
97
  }
@@ -9,31 +9,36 @@ import React from 'react';
9
9
 
10
10
  import Layout from '@theme/Layout';
11
11
  import {
12
+ PageMetadata,
13
+ HtmlClassNameProvider,
12
14
  ThemeClassNames,
13
15
  translateTagsPageTitle,
14
16
  } from '@docusaurus/theme-common';
15
17
  import TagsListByLetter from '@theme/TagsListByLetter';
16
18
  import type {Props} from '@theme/DocTagsListPage';
19
+ import SearchMetadata from '@theme/SearchMetadata';
20
+ import clsx from 'clsx';
17
21
 
18
22
  export default function DocTagsListPage({tags}: Props): JSX.Element {
19
23
  const title = translateTagsPageTitle();
20
24
  return (
21
- <Layout
22
- title={title}
23
- wrapperClassName={ThemeClassNames.wrapper.docsPages}
24
- pageClassName={ThemeClassNames.page.docsTagsListPage}
25
- searchMetadata={{
26
- // assign unique search tag to exclude this page from search results!
27
- tag: 'doc_tags_list',
28
- }}>
29
- <div className="container margin-vert--lg">
30
- <div className="row">
31
- <main className="col col--8 col--offset-2">
32
- <h1>{title}</h1>
33
- <TagsListByLetter tags={tags} />
34
- </main>
25
+ <HtmlClassNameProvider
26
+ className={clsx(
27
+ ThemeClassNames.wrapper.docsPages,
28
+ ThemeClassNames.page.docsTagsListPage,
29
+ )}>
30
+ <PageMetadata title={title} />
31
+ <SearchMetadata tag="doc_tags_list" />
32
+ <Layout>
33
+ <div className="container margin-vert--lg">
34
+ <div className="row">
35
+ <main className="col col--8 col--offset-2">
36
+ <h1>{title}</h1>
37
+ <TagsListByLetter tags={tags} />
38
+ </main>
39
+ </div>
35
40
  </div>
36
- </div>
37
- </Layout>
41
+ </Layout>
42
+ </HtmlClassNameProvider>
38
43
  );
39
44
  }
@@ -13,20 +13,30 @@ import AnnouncementBar from '@theme/AnnouncementBar';
13
13
  import Navbar from '@theme/Navbar';
14
14
  import Footer from '@theme/Footer';
15
15
  import LayoutProviders from '@theme/LayoutProviders';
16
- import LayoutHead from '@theme/LayoutHead';
17
16
  import type {Props} from '@theme/Layout';
18
- import {ThemeClassNames, useKeyboardNavigation} from '@docusaurus/theme-common';
17
+ import {
18
+ PageMetadata,
19
+ ThemeClassNames,
20
+ useKeyboardNavigation,
21
+ } from '@docusaurus/theme-common';
19
22
  import ErrorPageContent from '@theme/ErrorPageContent';
20
23
  import './styles.css';
21
24
 
22
25
  export default function Layout(props: Props): JSX.Element {
23
- const {children, noFooter, wrapperClassName, pageClassName} = props;
26
+ const {
27
+ children,
28
+ noFooter,
29
+ wrapperClassName,
30
+ // not really layout-related, but kept for convenience/retro-compatibility
31
+ title,
32
+ description,
33
+ } = props;
24
34
 
25
35
  useKeyboardNavigation();
26
36
 
27
37
  return (
28
38
  <LayoutProviders>
29
- <LayoutHead {...props} />
39
+ <PageMetadata title={title} description={description} />
30
40
 
31
41
  <SkipToContent />
32
42
 
@@ -34,12 +44,7 @@ export default function Layout(props: Props): JSX.Element {
34
44
 
35
45
  <Navbar />
36
46
 
37
- <div
38
- className={clsx(
39
- ThemeClassNames.wrapper.main,
40
- wrapperClassName,
41
- pageClassName,
42
- )}>
47
+ <div className={clsx(ThemeClassNames.wrapper.main, wrapperClassName)}>
43
48
  <ErrorBoundary fallback={ErrorPageContent}>{children}</ErrorBoundary>
44
49
  </div>
45
50
 
@@ -11,43 +11,49 @@ import Layout from '@theme/Layout';
11
11
  import MDXContent from '@theme/MDXContent';
12
12
  import type {Props} from '@theme/MDXPage';
13
13
  import TOC from '@theme/TOC';
14
- import {ThemeClassNames} from '@docusaurus/theme-common';
14
+ import {
15
+ PageMetadata,
16
+ HtmlClassNameProvider,
17
+ ThemeClassNames,
18
+ } from '@docusaurus/theme-common';
15
19
 
16
20
  import styles from './styles.module.css';
17
21
 
18
22
  export default function MDXPage(props: Props): JSX.Element {
19
23
  const {content: MDXPageContent} = props;
20
24
  const {
21
- metadata: {title, description, permalink, frontMatter},
25
+ metadata: {title, description, frontMatter},
22
26
  } = MDXPageContent;
23
27
  const {wrapperClassName, hide_table_of_contents: hideTableOfContents} =
24
28
  frontMatter;
25
29
 
26
30
  return (
27
- <Layout
28
- title={title}
29
- description={description}
30
- permalink={permalink}
31
- wrapperClassName={wrapperClassName ?? ThemeClassNames.wrapper.mdxPages}
32
- pageClassName={ThemeClassNames.page.mdxPage}>
33
- <main className="container container--fluid margin-vert--lg">
34
- <div className={clsx('row', styles.mdxPageWrapper)}>
35
- <div className={clsx('col', !hideTableOfContents && 'col--8')}>
36
- <MDXContent>
37
- <MDXPageContent />
38
- </MDXContent>
39
- </div>
40
- {!hideTableOfContents && MDXPageContent.toc && (
41
- <div className="col col--2">
42
- <TOC
43
- toc={MDXPageContent.toc}
44
- minHeadingLevel={frontMatter.toc_min_heading_level}
45
- maxHeadingLevel={frontMatter.toc_max_heading_level}
46
- />
31
+ <HtmlClassNameProvider
32
+ className={clsx(
33
+ wrapperClassName ?? ThemeClassNames.wrapper.mdxPages,
34
+ ThemeClassNames.page.mdxPage,
35
+ )}>
36
+ <PageMetadata title={title} description={description} />
37
+ <Layout>
38
+ <main className="container container--fluid margin-vert--lg">
39
+ <div className={clsx('row', styles.mdxPageWrapper)}>
40
+ <div className={clsx('col', !hideTableOfContents && 'col--8')}>
41
+ <MDXContent>
42
+ <MDXPageContent />
43
+ </MDXContent>
47
44
  </div>
48
- )}
49
- </div>
50
- </main>
51
- </Layout>
45
+ {!hideTableOfContents && MDXPageContent.toc && (
46
+ <div className="col col--2">
47
+ <TOC
48
+ toc={MDXPageContent.toc}
49
+ minHeadingLevel={frontMatter.toc_min_heading_level}
50
+ maxHeadingLevel={frontMatter.toc_max_heading_level}
51
+ />
52
+ </div>
53
+ )}
54
+ </div>
55
+ </main>
56
+ </Layout>
57
+ </HtmlClassNameProvider>
52
58
  );
53
59
  }
@@ -8,42 +8,47 @@
8
8
  import React from 'react';
9
9
  import Layout from '@theme/Layout';
10
10
  import Translate, {translate} from '@docusaurus/Translate';
11
+ import {PageMetadata} from '@docusaurus/theme-common';
11
12
 
12
13
  export default function NotFound(): JSX.Element {
13
14
  return (
14
- <Layout
15
- title={translate({
16
- id: 'theme.NotFound.title',
17
- message: 'Page Not Found',
18
- })}>
19
- <main className="container margin-vert--xl">
20
- <div className="row">
21
- <div className="col col--6 col--offset-3">
22
- <h1 className="hero__title">
23
- <Translate
24
- id="theme.NotFound.title"
25
- description="The title of the 404 page">
26
- Page Not Found
27
- </Translate>
28
- </h1>
29
- <p>
30
- <Translate
31
- id="theme.NotFound.p1"
32
- description="The first paragraph of the 404 page">
33
- We could not find what you were looking for.
34
- </Translate>
35
- </p>
36
- <p>
37
- <Translate
38
- id="theme.NotFound.p2"
39
- description="The 2nd paragraph of the 404 page">
40
- Please contact the owner of the site that linked you to the
41
- original URL and let them know their link is broken.
42
- </Translate>
43
- </p>
15
+ <>
16
+ <PageMetadata
17
+ title={translate({
18
+ id: 'theme.NotFound.title',
19
+ message: 'Page Not Found',
20
+ })}
21
+ />
22
+ <Layout>
23
+ <main className="container margin-vert--xl">
24
+ <div className="row">
25
+ <div className="col col--6 col--offset-3">
26
+ <h1 className="hero__title">
27
+ <Translate
28
+ id="theme.NotFound.title"
29
+ description="The title of the 404 page">
30
+ Page Not Found
31
+ </Translate>
32
+ </h1>
33
+ <p>
34
+ <Translate
35
+ id="theme.NotFound.p1"
36
+ description="The first paragraph of the 404 page">
37
+ We could not find what you were looking for.
38
+ </Translate>
39
+ </p>
40
+ <p>
41
+ <Translate
42
+ id="theme.NotFound.p2"
43
+ description="The 2nd paragraph of the 404 page">
44
+ Please contact the owner of the site that linked you to the
45
+ original URL and let them know their link is broken.
46
+ </Translate>
47
+ </p>
48
+ </div>
44
49
  </div>
45
- </div>
46
- </main>
47
- </Layout>
50
+ </main>
51
+ </Layout>
52
+ </>
48
53
  );
49
54
  }
@@ -9,19 +9,18 @@ import React from 'react';
9
9
  import Head from '@docusaurus/Head';
10
10
  import useDocusaurusContext from '@docusaurus/useDocusaurusContext';
11
11
  import useBaseUrl from '@docusaurus/useBaseUrl';
12
- import type {Props} from '@theme/Layout';
13
12
  import SearchMetadata from '@theme/SearchMetadata';
14
- import Seo from '@theme/Seo';
15
13
  import {
14
+ PageMetadata,
16
15
  DEFAULT_SEARCH_TAG,
17
- useTitleFormatter,
18
16
  useAlternatePageUtils,
19
17
  useThemeConfig,
20
18
  keyboardFocusedClassName,
21
19
  } from '@docusaurus/theme-common';
22
20
  import {useLocation} from '@docusaurus/router';
23
21
 
24
- // Useful for SEO
22
+ // TODO move to SiteMetadataDefaults or theme-common ?
23
+ // Useful for i18n/SEO
25
24
  // See https://developers.google.com/search/docs/advanced/crawling/localized-versions
26
25
  // See https://github.com/facebook/docusaurus/issues/3317
27
26
  function AlternateLangHeaders(): JSX.Element {
@@ -66,6 +65,7 @@ function useDefaultCanonicalUrl() {
66
65
  return siteUrl + useBaseUrl(pathname);
67
66
  }
68
67
 
68
+ // TODO move to SiteMetadataDefaults or theme-common ?
69
69
  function CanonicalUrlHeaders({permalink}: {permalink?: string}) {
70
70
  const {
71
71
  siteConfig: {url: siteUrl},
@@ -83,45 +83,31 @@ function CanonicalUrlHeaders({permalink}: {permalink?: string}) {
83
83
  );
84
84
  }
85
85
 
86
- export default function LayoutHead(props: Props): JSX.Element {
86
+ export default function SiteMetadata(): JSX.Element {
87
87
  const {
88
- siteConfig: {favicon},
89
- i18n: {currentLocale, localeConfigs},
88
+ i18n: {currentLocale},
90
89
  } = useDocusaurusContext();
90
+
91
+ // TODO maybe move these 2 themeConfig to siteConfig?
92
+ // These seems useful for other themes as well
91
93
  const {metadata, image: defaultImage} = useThemeConfig();
92
- const {title, description, image, keywords, searchMetadata} = props;
93
- const faviconUrl = useBaseUrl(favicon);
94
- const pageTitle = useTitleFormatter(title);
95
- const {htmlLang, direction: htmlDir} = localeConfigs[currentLocale]!;
96
94
 
97
95
  return (
98
96
  <>
99
97
  <Head>
100
- <html lang={htmlLang} dir={htmlDir} />
101
- {favicon && <link rel="icon" href={faviconUrl} />}
102
- <title>{pageTitle}</title>
103
- <meta property="og:title" content={pageTitle} />
104
98
  <meta name="twitter:card" content="summary_large_image" />
105
99
  {/* The keyboard focus class name need to be applied when SSR so links
106
100
  are outlined when JS is disabled */}
107
101
  <body className={keyboardFocusedClassName} />
108
102
  </Head>
109
103
 
110
- {/* image can override the default image */}
111
- {defaultImage && <Seo image={defaultImage} />}
112
- {image && <Seo image={image} />}
113
-
114
- <Seo description={description} keywords={keywords} />
104
+ {defaultImage && <PageMetadata image={defaultImage} />}
115
105
 
116
106
  <CanonicalUrlHeaders />
117
107
 
118
108
  <AlternateLangHeaders />
119
109
 
120
- <SearchMetadata
121
- tag={DEFAULT_SEARCH_TAG}
122
- locale={currentLocale}
123
- {...searchMetadata}
124
- />
110
+ <SearchMetadata tag={DEFAULT_SEARCH_TAG} locale={currentLocale} />
125
111
 
126
112
  <Head
127
113
  // it's important to have an additional <Head> element here,