@docusaurus/theme-classic 0.0.0-5961 → 0.0.0-5963

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.
@@ -52,7 +52,7 @@ function BlogTagsPostsPageMetadata({tag}) {
52
52
  const title = useBlogTagsPostsPageTitle(tag);
53
53
  return (
54
54
  <>
55
- <PageMetadata title={title} />
55
+ <PageMetadata title={title} description={tag.description} />
56
56
  <SearchMetadata tag="blog_tags_posts" />
57
57
  </>
58
58
  );
@@ -64,6 +64,7 @@ function BlogTagsPostsPageContent({tag, items, sidebar, listMetadata}) {
64
64
  {tag.unlisted && <Unlisted />}
65
65
  <header className="margin-bottom--xl">
66
66
  <Heading as="h1">{title}</Heading>
67
+ {tag.description && <p>{tag.description}</p>}
67
68
  <Link href={tag.allTagsPath}>
68
69
  <Translate
69
70
  id="theme.tags.tagsPageLink"
@@ -55,10 +55,10 @@ function DocItem({doc}) {
55
55
  </article>
56
56
  );
57
57
  }
58
- function DocTagDocListPageMetadata({title}) {
58
+ function DocTagDocListPageMetadata({title, tag}) {
59
59
  return (
60
60
  <>
61
- <PageMetadata title={title} />
61
+ <PageMetadata title={title} description={tag.description} />
62
62
  <SearchMetadata tag="doc_tag_doc_list" />
63
63
  </>
64
64
  );
@@ -73,6 +73,7 @@ function DocTagDocListPageContent({tag, title}) {
73
73
  {tag.unlisted && <Unlisted />}
74
74
  <header className="margin-bottom--xl">
75
75
  <Heading as="h1">{title}</Heading>
76
+ {tag.description && <p>{tag.description}</p>}
76
77
  <Link href={tag.allTagsPath}>
77
78
  <Translate
78
79
  id="theme.tags.tagsPageLink"
@@ -7,4 +7,4 @@
7
7
  /// <reference path="../../../src/theme-classic.d.ts" />
8
8
  /// <reference types="react" />
9
9
  import type { Props } from '@theme/Tag';
10
- export default function Tag({ permalink, label, count }: Props): JSX.Element;
10
+ export default function Tag({ permalink, label, count, description, }: Props): JSX.Element;
@@ -8,10 +8,11 @@ import React from 'react';
8
8
  import clsx from 'clsx';
9
9
  import Link from '@docusaurus/Link';
10
10
  import styles from './styles.module.css';
11
- export default function Tag({permalink, label, count}) {
11
+ export default function Tag({permalink, label, count, description}) {
12
12
  return (
13
13
  <Link
14
14
  href={permalink}
15
+ title={description}
15
16
  className={clsx(
16
17
  styles.tag,
17
18
  count ? styles.tagWithCount : styles.tagRegular,
@@ -20,9 +20,9 @@ export default function TagsListInline({tags}) {
20
20
  </Translate>
21
21
  </b>
22
22
  <ul className={clsx(styles.tags, 'padding--none', 'margin-left--sm')}>
23
- {tags.map(({label, permalink: tagPermalink}) => (
24
- <li key={tagPermalink} className={styles.tag}>
25
- <Tag label={label} permalink={tagPermalink} />
23
+ {tags.map((tag) => (
24
+ <li key={tag.permalink} className={styles.tag}>
25
+ <Tag {...tag} />
26
26
  </li>
27
27
  ))}
28
28
  </ul>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/theme-classic",
3
- "version": "0.0.0-5961",
3
+ "version": "0.0.0-5963",
4
4
  "description": "Classic theme for Docusaurus",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/theme-classic.d.ts",
@@ -20,18 +20,18 @@
20
20
  "copy:watch": "node ../../admin/scripts/copyUntypedFiles.js --watch"
21
21
  },
22
22
  "dependencies": {
23
- "@docusaurus/core": "0.0.0-5961",
24
- "@docusaurus/mdx-loader": "0.0.0-5961",
25
- "@docusaurus/module-type-aliases": "0.0.0-5961",
26
- "@docusaurus/plugin-content-blog": "0.0.0-5961",
27
- "@docusaurus/plugin-content-docs": "0.0.0-5961",
28
- "@docusaurus/plugin-content-pages": "0.0.0-5961",
29
- "@docusaurus/theme-common": "0.0.0-5961",
30
- "@docusaurus/theme-translations": "0.0.0-5961",
31
- "@docusaurus/types": "0.0.0-5961",
32
- "@docusaurus/utils": "0.0.0-5961",
33
- "@docusaurus/utils-common": "0.0.0-5961",
34
- "@docusaurus/utils-validation": "0.0.0-5961",
23
+ "@docusaurus/core": "0.0.0-5963",
24
+ "@docusaurus/mdx-loader": "0.0.0-5963",
25
+ "@docusaurus/module-type-aliases": "0.0.0-5963",
26
+ "@docusaurus/plugin-content-blog": "0.0.0-5963",
27
+ "@docusaurus/plugin-content-docs": "0.0.0-5963",
28
+ "@docusaurus/plugin-content-pages": "0.0.0-5963",
29
+ "@docusaurus/theme-common": "0.0.0-5963",
30
+ "@docusaurus/theme-translations": "0.0.0-5963",
31
+ "@docusaurus/types": "0.0.0-5963",
32
+ "@docusaurus/utils": "0.0.0-5963",
33
+ "@docusaurus/utils-common": "0.0.0-5963",
34
+ "@docusaurus/utils-validation": "0.0.0-5963",
35
35
  "@mdx-js/react": "^3.0.0",
36
36
  "clsx": "^2.0.0",
37
37
  "copy-text-to-clipboard": "^3.2.0",
@@ -61,5 +61,5 @@
61
61
  "engines": {
62
62
  "node": ">=18.0"
63
63
  },
64
- "gitHead": "ae17c4245467ae9c0c218dc375d4d059410f8622"
64
+ "gitHead": "e9090dc8a38a21043b0849887aa7d54d04c4af9f"
65
65
  }
@@ -57,7 +57,7 @@ function BlogTagsPostsPageMetadata({tag}: Props): JSX.Element {
57
57
  const title = useBlogTagsPostsPageTitle(tag);
58
58
  return (
59
59
  <>
60
- <PageMetadata title={title} />
60
+ <PageMetadata title={title} description={tag.description} />
61
61
  <SearchMetadata tag="blog_tags_posts" />
62
62
  </>
63
63
  );
@@ -75,6 +75,7 @@ function BlogTagsPostsPageContent({
75
75
  {tag.unlisted && <Unlisted />}
76
76
  <header className="margin-bottom--xl">
77
77
  <Heading as="h1">{title}</Heading>
78
+ {tag.description && <p>{tag.description}</p>}
78
79
  <Link href={tag.allTagsPath}>
79
80
  <Translate
80
81
  id="theme.tags.tagsPageLink"
@@ -63,10 +63,11 @@ function DocItem({doc}: {doc: Props['tag']['items'][number]}): JSX.Element {
63
63
 
64
64
  function DocTagDocListPageMetadata({
65
65
  title,
66
+ tag,
66
67
  }: Props & {title: string}): JSX.Element {
67
68
  return (
68
69
  <>
69
- <PageMetadata title={title} />
70
+ <PageMetadata title={title} description={tag.description} />
70
71
  <SearchMetadata tag="doc_tag_doc_list" />
71
72
  </>
72
73
  );
@@ -85,6 +86,7 @@ function DocTagDocListPageContent({
85
86
  {tag.unlisted && <Unlisted />}
86
87
  <header className="margin-bottom--xl">
87
88
  <Heading as="h1">{title}</Heading>
89
+ {tag.description && <p>{tag.description}</p>}
88
90
  <Link href={tag.allTagsPath}>
89
91
  <Translate
90
92
  id="theme.tags.tagsPageLink"
@@ -12,10 +12,16 @@ import type {Props} from '@theme/Tag';
12
12
 
13
13
  import styles from './styles.module.css';
14
14
 
15
- export default function Tag({permalink, label, count}: Props): JSX.Element {
15
+ export default function Tag({
16
+ permalink,
17
+ label,
18
+ count,
19
+ description,
20
+ }: Props): JSX.Element {
16
21
  return (
17
22
  <Link
18
23
  href={permalink}
24
+ title={description}
19
25
  className={clsx(
20
26
  styles.tag,
21
27
  count ? styles.tagWithCount : styles.tagRegular,
@@ -24,9 +24,9 @@ export default function TagsListInline({tags}: Props): JSX.Element {
24
24
  </Translate>
25
25
  </b>
26
26
  <ul className={clsx(styles.tags, 'padding--none', 'margin-left--sm')}>
27
- {tags.map(({label, permalink: tagPermalink}) => (
28
- <li key={tagPermalink} className={styles.tag}>
29
- <Tag label={label} permalink={tagPermalink} />
27
+ {tags.map((tag) => (
28
+ <li key={tag.permalink} className={styles.tag}>
29
+ <Tag {...tag} />
30
30
  </li>
31
31
  ))}
32
32
  </ul>