@docusaurus/theme-classic 0.0.0-4486 → 0.0.0-4490

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.
package/lib/index.js CHANGED
@@ -128,21 +128,12 @@ function docusaurusThemeClassic(context, options) {
128
128
  return {
129
129
  name: 'docusaurus-theme-classic',
130
130
 
131
- /*
132
- Does not seem needed: webpack can already hot reload theme files
133
- getPathsToWatch() {
134
- return [
135
- path.join(__dirname, '..', 'lib'),
136
- path.join(__dirname, '..', 'lib-next'),
137
- ];
138
- },
139
- */
140
131
  getThemePath() {
141
- return _path.default.join(__dirname, '..', 'lib-next', 'theme');
132
+ return _path.default.join(__dirname, '../lib-next/theme');
142
133
  },
143
134
 
144
135
  getTypeScriptThemePath() {
145
- return _path.default.resolve(__dirname, '..', 'src', 'theme');
136
+ return _path.default.resolve(__dirname, '../src/theme');
146
137
  },
147
138
 
148
139
  getTranslationFiles: async () => (0, _translations.getTranslationFiles)({
@@ -11,6 +11,7 @@ import Translate, {translate} from '@docusaurus/Translate';
11
11
  import Link from '@docusaurus/Link';
12
12
  import {useBaseUrlUtils} from '@docusaurus/useBaseUrl';
13
13
  import {usePluralForm} from '@docusaurus/theme-common';
14
+ import {blogPostContainerID} from '@docusaurus/utils-common';
14
15
  import MDXComponents from '@theme/MDXComponents';
15
16
  import EditThisPage from '@theme/EditThisPage';
16
17
  import styles from './styles.module.css';
@@ -103,7 +104,10 @@ function BlogPostItem(props) {
103
104
  />
104
105
  )}
105
106
 
106
- <div className="markdown" itemProp="articleBody">
107
+ <div // This ID is used for the feed generation to locate the main content
108
+ id={isBlogPostPage ? blogPostContainerID : undefined}
109
+ className="markdown"
110
+ itemProp="articleBody">
107
111
  <MDXProvider components={MDXComponents}>{children}</MDXProvider>
108
112
  </div>
109
113
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@docusaurus/theme-classic",
3
- "version": "0.0.0-4486",
3
+ "version": "0.0.0-4490",
4
4
  "description": "Classic theme for Docusaurus",
5
5
  "main": "lib/index.js",
6
6
  "types": "src/theme-classic.d.ts",
@@ -18,19 +18,18 @@
18
18
  "watch": "concurrently --names \"lib,lib-next,tsc\" --kill-others \"yarn babel:lib --watch\" \"yarn babel:lib-next --watch\" \"yarn tsc --watch\"",
19
19
  "babel:lib": "cross-env BABEL_ENV=lib babel src -d lib --extensions \".tsx,.ts\" --ignore \"**/*.d.ts\" --copy-files",
20
20
  "babel:lib-next": "cross-env BABEL_ENV=lib-next babel src -d lib-next --extensions \".tsx,.ts\" --ignore \"**/*.d.ts\" --copy-files",
21
- "format": "prettier --config ../../.prettierrc --ignore-path ../../.prettierignore --write \"**/*.{js,ts,jsx,tsc}\"",
22
- "format:lib-next": "prettier --config ../../.prettierrc --write \"lib-next/**/*.{js,ts,jsx,tsc}\"",
23
- "update-code-translations": "node -e 'require(\"./update-code-translations.js\").run()'"
21
+ "format:lib-next": "prettier --config ../../.prettierrc --write \"lib-next/**/*.{js,ts,jsx,tsc}\""
24
22
  },
25
23
  "dependencies": {
26
- "@docusaurus/core": "0.0.0-4486",
27
- "@docusaurus/plugin-content-blog": "0.0.0-4486",
28
- "@docusaurus/plugin-content-docs": "0.0.0-4486",
29
- "@docusaurus/plugin-content-pages": "0.0.0-4486",
30
- "@docusaurus/theme-common": "0.0.0-4486",
31
- "@docusaurus/theme-translations": "0.0.0-4486",
32
- "@docusaurus/utils": "0.0.0-4486",
33
- "@docusaurus/utils-validation": "0.0.0-4486",
24
+ "@docusaurus/core": "0.0.0-4490",
25
+ "@docusaurus/plugin-content-blog": "0.0.0-4490",
26
+ "@docusaurus/plugin-content-docs": "0.0.0-4490",
27
+ "@docusaurus/plugin-content-pages": "0.0.0-4490",
28
+ "@docusaurus/theme-common": "0.0.0-4490",
29
+ "@docusaurus/theme-translations": "0.0.0-4490",
30
+ "@docusaurus/utils": "0.0.0-4490",
31
+ "@docusaurus/utils-common": "0.0.0-4490",
32
+ "@docusaurus/utils-validation": "0.0.0-4490",
34
33
  "@mdx-js/react": "^1.6.21",
35
34
  "clsx": "^1.1.1",
36
35
  "copy-text-to-clipboard": "^3.0.1",
@@ -43,11 +42,13 @@
43
42
  "rtlcss": "^3.3.0"
44
43
  },
45
44
  "devDependencies": {
46
- "@docusaurus/module-type-aliases": "0.0.0-4486",
47
- "@docusaurus/types": "0.0.0-4486",
45
+ "@docusaurus/module-type-aliases": "0.0.0-4490",
46
+ "@docusaurus/types": "0.0.0-4490",
48
47
  "@types/mdx-js__react": "^1.5.4",
49
48
  "@types/parse-numeric-range": "^0.0.1",
49
+ "@types/prismjs": "^1.16.2",
50
50
  "@types/rtlcss": "^3.1.1",
51
+ "cross-env": "^7.0.3",
51
52
  "fs-extra": "^10.0.0",
52
53
  "react-test-renderer": "^17.0.2",
53
54
  "utility-types": "^3.10.0"
@@ -59,5 +60,5 @@
59
60
  "engines": {
60
61
  "node": ">=14"
61
62
  },
62
- "gitHead": "32035a982913a5bf412a9138f3777fdb164a78e6"
63
+ "gitHead": "70934672dc6eab5689cccd41349a03213ff49122"
63
64
  }
package/src/index.ts CHANGED
@@ -110,22 +110,12 @@ export default function docusaurusThemeClassic(
110
110
  return {
111
111
  name: 'docusaurus-theme-classic',
112
112
 
113
- /*
114
- Does not seem needed: webpack can already hot reload theme files
115
- getPathsToWatch() {
116
- return [
117
- path.join(__dirname, '..', 'lib'),
118
- path.join(__dirname, '..', 'lib-next'),
119
- ];
120
- },
121
- */
122
-
123
113
  getThemePath() {
124
- return path.join(__dirname, '..', 'lib-next', 'theme');
114
+ return path.join(__dirname, '../lib-next/theme');
125
115
  },
126
116
 
127
117
  getTypeScriptThemePath() {
128
- return path.resolve(__dirname, '..', 'src', 'theme');
118
+ return path.resolve(__dirname, '../src/theme');
129
119
  },
130
120
 
131
121
  getTranslationFiles: async () => getTranslationFiles({themeConfig}),
@@ -12,6 +12,7 @@ import Translate, {translate} from '@docusaurus/Translate';
12
12
  import Link from '@docusaurus/Link';
13
13
  import {useBaseUrlUtils} from '@docusaurus/useBaseUrl';
14
14
  import {usePluralForm} from '@docusaurus/theme-common';
15
+ import {blogPostContainerID} from '@docusaurus/utils-common';
15
16
  import MDXComponents from '@theme/MDXComponents';
16
17
  import EditThisPage from '@theme/EditThisPage';
17
18
  import type {Props} from '@theme/BlogPostItem';
@@ -102,7 +103,11 @@ function BlogPostItem(props: Props): JSX.Element {
102
103
  <meta itemProp="image" content={withBaseUrl(image, {absolute: true})} />
103
104
  )}
104
105
 
105
- <div className="markdown" itemProp="articleBody">
106
+ <div
107
+ // This ID is used for the feed generation to locate the main content
108
+ id={isBlogPostPage ? blogPostContainerID : undefined}
109
+ className="markdown"
110
+ itemProp="articleBody">
106
111
  <MDXProvider components={MDXComponents}>{children}</MDXProvider>
107
112
  </div>
108
113