Skip to content

Commit c0f571b

Browse files
committed
Remove unused gatsby-remark plug-ins
Signed-off-by: Thomas Hallgren <thomas@tada.se>
1 parent dc1ad10 commit c0f571b

File tree

9 files changed

+8
-218
lines changed

9 files changed

+8
-218
lines changed

gatsby-config.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,14 +31,6 @@ module.exports = {
3131
resolve: 'gatsby-plugin-mdx',
3232
options: {
3333
extensions: [`.md`],
34-
gatsbyRemarkPlugins: [
35-
{
36-
resolve: 'gatsby-remark-autolink-headers',
37-
options: {
38-
enableCustomId: true,
39-
},
40-
},
41-
],
4234
},
4335
},
4436
{
@@ -61,9 +53,6 @@ module.exports = {
6153
path: `${__dirname}/src/frontmatter-schema/`,
6254
},
6355
},
64-
{
65-
resolve: 'gatsby-remark-reading-time',
66-
},
6756
// We need this in order to set things in <head> in the HTML. Otherwise it
6857
// gets set by client-side in the DOM after page-load.
6958
{

package.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
"gatsby-plugin-netlify": "^4.4.0",
2323
"gatsby-plugin-react-helmet": "^5.0.0",
2424
"gatsby-plugin-react-svg": "^3.1.0",
25-
"gatsby-remark-autolink-headers": "file:./plugins/gatsby-remark-autoid-headers",
26-
"gatsby-remark-reading-time": "file:./plugins/gatsby-remark-reading-time",
2725
"gatsby-source-filesystem": "^4.0.0",
2826
"jquery": "^3.6.0",
2927
"less": "^4.2.0",
@@ -46,9 +44,6 @@
4644
"webpack": "^5.79.0"
4745
},
4846
"devDependencies": {
49-
"@babel/core": "^7.13.0",
50-
"@babel/helper-hoist-variables": "^7.16.0",
51-
"babel-eslint": "^10.0.0",
5247
"eslint": "^8.6.0",
5348
"eslint-config-react-app": "^7.0.1",
5449
"gatsby-plugin-webpack-bundle-analyser-v2": "^1.1.25"

plugins/gatsby-remark-autoid-headers/index.js

Lines changed: 0 additions & 76 deletions
This file was deleted.

plugins/gatsby-remark-autoid-headers/package.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

plugins/gatsby-remark-reading-time/gatsby-node.js

Lines changed: 0 additions & 18 deletions
This file was deleted.

plugins/gatsby-remark-reading-time/index.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

plugins/gatsby-remark-reading-time/package.json

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/templates/doc-page.js

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -61,18 +61,12 @@ const MarkdownContent = ({
6161
mdxNode,
6262
variables,
6363
siteTitle,
64-
maybeShowReadingTime,
6564
}) => {
6665
const title = mdxNode.frontmatter.title ||
6766
mdxNode.headings[0]?.value ||
6867
"Docs";
6968
const description = mdxNode.frontmatter.description ||
7069
mdxNode.excerpt;
71-
const readingTime = mdxNode.frontmatter.reading_time ||
72-
mdxNode.fields.readingTime.text;
73-
74-
const showReadingTime = maybeShowReadingTime &&
75-
!mdxNode.frontmatter.frontmatter.hide_reading_time;
7670

7771
return (
7872
<>
@@ -81,7 +75,6 @@ const MarkdownContent = ({
8175
<meta name="og:title" content={title + " | " + siteTitle} />
8276
<meta name="description" content={description} />
8377
</Helmet>
84-
{showReadingTime ? <span className="docs__reading-time">{readingTime}</span> : ''}
8578
<MDXProvider components={mdxComponents}>
8679
<MDXRenderer>
8780
{template(mdxNode.body, variables)}
@@ -151,8 +144,7 @@ const DocPage = props => {
151144
data.contentFile.childMdx
152145
? <MarkdownContent mdxNode={data.contentFile.childMdx}
153146
variables={variables}
154-
siteTitle={data.site.siteMetadata.title}
155-
maybeShowReadingTime={docinfo.maybeShowReadingTime} />
147+
siteTitle={data.site.siteMetadata.title} />
156148
: <ReleaseNotesContent releaseNotes={releaseNotes}
157149
variables={variables}
158150
siteTitle={data.site.siteMetadata.title} />
@@ -210,12 +202,6 @@ export const query = graphql`
210202
value # fallback for frontmatter.title
211203
}
212204
excerpt(pruneLength: 150, truncate: true) # fallback for frontmatter.description
213-
fields {
214-
readingTime {
215-
text # fallback for frontmatter.reading_time
216-
}
217-
}
218-
219205
}
220206
# But in some cases (namely: release-notes.yml) it's not actually a markdown file.
221207
internal {

yarn.lock

Lines changed: 7 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
semver "^5.4.1"
8181
source-map "^0.5.0"
8282

83-
"@babel/core@^7.13.0", "@babel/core@^7.14.0", "@babel/core@^7.15.5", "@babel/core@^7.16.0":
83+
"@babel/core@^7.14.0", "@babel/core@^7.15.5", "@babel/core@^7.16.0":
8484
version "7.25.2"
8585
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.25.2.tgz#ed8eec275118d7613e77a352894cd12ded8eba77"
8686
integrity sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA==
@@ -179,13 +179,6 @@
179179
lodash.debounce "^4.0.8"
180180
resolve "^1.14.2"
181181

182-
"@babel/helper-hoist-variables@^7.16.0":
183-
version "7.24.7"
184-
resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz#b4ede1cde2fd89436397f30dc9376ee06b0f25ee"
185-
integrity sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==
186-
dependencies:
187-
"@babel/types" "^7.24.7"
188-
189182
"@babel/helper-member-expression-to-functions@^7.24.8":
190183
version "7.24.8"
191184
resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.24.8.tgz#6155e079c913357d24a4c20480db7c712a5c3fb6"
@@ -305,7 +298,7 @@
305298
js-tokens "^4.0.0"
306299
picocolors "^1.0.0"
307300

308-
"@babel/parser@^7.12.7", "@babel/parser@^7.14.0", "@babel/parser@^7.15.5", "@babel/parser@^7.16.8", "@babel/parser@^7.25.0", "@babel/parser@^7.25.6", "@babel/parser@^7.7.0":
301+
"@babel/parser@^7.12.7", "@babel/parser@^7.14.0", "@babel/parser@^7.15.5", "@babel/parser@^7.16.8", "@babel/parser@^7.25.0", "@babel/parser@^7.25.6":
309302
version "7.25.6"
310303
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.25.6.tgz#85660c5ef388cbbf6e3d2a694ee97a38f18afe2f"
311304
integrity sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==
@@ -1187,7 +1180,7 @@
11871180
"@babel/parser" "^7.25.0"
11881181
"@babel/types" "^7.25.0"
11891182

1190-
"@babel/traverse@^7.12.9", "@babel/traverse@^7.14.0", "@babel/traverse@^7.15.4", "@babel/traverse@^7.16.8", "@babel/traverse@^7.24.7", "@babel/traverse@^7.24.8", "@babel/traverse@^7.25.0", "@babel/traverse@^7.25.1", "@babel/traverse@^7.25.2", "@babel/traverse@^7.25.3", "@babel/traverse@^7.25.4", "@babel/traverse@^7.7.0":
1183+
"@babel/traverse@^7.12.9", "@babel/traverse@^7.14.0", "@babel/traverse@^7.15.4", "@babel/traverse@^7.16.8", "@babel/traverse@^7.24.7", "@babel/traverse@^7.24.8", "@babel/traverse@^7.25.0", "@babel/traverse@^7.25.1", "@babel/traverse@^7.25.2", "@babel/traverse@^7.25.3", "@babel/traverse@^7.25.4":
11911184
version "7.25.6"
11921185
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.25.6.tgz#04fad980e444f182ecf1520504941940a90fea41"
11931186
integrity sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ==
@@ -1209,7 +1202,7 @@
12091202
lodash "^4.17.13"
12101203
to-fast-properties "^2.0.0"
12111204

1212-
"@babel/types@^7.0.0", "@babel/types@^7.0.0-beta.49", "@babel/types@^7.12.7", "@babel/types@^7.15.4", "@babel/types@^7.16.8", "@babel/types@^7.24.7", "@babel/types@^7.24.8", "@babel/types@^7.25.0", "@babel/types@^7.25.2", "@babel/types@^7.25.6", "@babel/types@^7.4.4", "@babel/types@^7.7.0":
1205+
"@babel/types@^7.0.0", "@babel/types@^7.0.0-beta.49", "@babel/types@^7.12.7", "@babel/types@^7.15.4", "@babel/types@^7.16.8", "@babel/types@^7.24.7", "@babel/types@^7.24.8", "@babel/types@^7.25.0", "@babel/types@^7.25.2", "@babel/types@^7.25.6", "@babel/types@^7.4.4":
12131206
version "7.25.6"
12141207
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.25.6.tgz#893942ddb858f32ae7a004ec9d3a76b3463ef8e6"
12151208
integrity sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==
@@ -3401,18 +3394,6 @@ axobject-query@~3.1.1:
34013394
dependencies:
34023395
deep-equal "^2.0.5"
34033396

3404-
babel-eslint@^10.0.0:
3405-
version "10.1.0"
3406-
resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.1.0.tgz#6968e568a910b78fb3779cdd8b6ac2f479943232"
3407-
integrity sha512-ifWaTHQ0ce+448CYop8AdrQiBsGrnC+bMgfyKFdi6EsPLTAWG+QfyDeM6OH+FmWnKvEq5NnBMLvlBUPKQZoDSg==
3408-
dependencies:
3409-
"@babel/code-frame" "^7.0.0"
3410-
"@babel/parser" "^7.7.0"
3411-
"@babel/traverse" "^7.7.0"
3412-
"@babel/types" "^7.7.0"
3413-
eslint-visitor-keys "^1.0.0"
3414-
resolve "^1.12.0"
3415-
34163397
babel-loader@^8.2.3:
34173398
version "8.3.0"
34183399
resolved "https://registry.yarnpkg.com/babel-loader/-/babel-loader-8.3.0.tgz#124936e841ba4fe8176786d6ff28add1f134d6a8"
@@ -5943,7 +5924,7 @@ eslint-utils@^3.0.0:
59435924
dependencies:
59445925
eslint-visitor-keys "^2.0.0"
59455926

5946-
eslint-visitor-keys@^1.0.0, eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0:
5927+
eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0:
59475928
version "1.3.0"
59485929
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e"
59495930
integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==
@@ -6886,18 +6867,6 @@ gatsby-react-router-scroll@^5.25.0:
68866867
"@babel/runtime" "^7.15.4"
68876868
prop-types "^15.8.1"
68886869

6889-
"gatsby-remark-autolink-headers@file:./plugins/gatsby-remark-autoid-headers":
6890-
version "0.0.1"
6891-
dependencies:
6892-
github-slugger "^1.3.0"
6893-
mdast-util-to-string "^1.1.0"
6894-
unist-util-visit "^1.4.1"
6895-
6896-
"gatsby-remark-reading-time@file:./plugins/gatsby-remark-reading-time":
6897-
version "1.1.0"
6898-
dependencies:
6899-
reading-time "^1.1.3"
6900-
69016870
gatsby-script@^1.10.0:
69026871
version "1.10.0"
69036872
resolved "https://registry.yarnpkg.com/gatsby-script/-/gatsby-script-1.10.0.tgz#0096ceaee2f251528c02bed5e7e058314d359127"
@@ -7203,7 +7172,7 @@ github-from-package@0.0.0:
72037172
resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce"
72047173
integrity sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==
72057174

7206-
github-slugger@^1.2.1, github-slugger@^1.3.0:
7175+
github-slugger@^1.2.1:
72077176
version "1.5.0"
72087177
resolved "https://registry.yarnpkg.com/github-slugger/-/github-slugger-1.5.0.tgz#17891bbc73232051474d68bd867a34625c955f7d"
72097178
integrity sha512-wIh+gKBI9Nshz2o46B0B3f5k/W+WI9ZAv6y5Dn5WJ5SK1t0TnDimB4WE5rmTD05ZAIn8HALCZVmCsvj0w0v0lw==
@@ -11182,11 +11151,6 @@ readdirp@~3.6.0:
1118211151
dependencies:
1118311152
picomatch "^2.2.1"
1118411153

11185-
reading-time@^1.1.3:
11186-
version "1.5.0"
11187-
resolved "https://registry.yarnpkg.com/reading-time/-/reading-time-1.5.0.tgz#d2a7f1b6057cb2e169beaf87113cc3411b5bc5bb"
11188-
integrity sha512-onYyVhBNr4CmAxFsKS7bz+uTLRakypIe4R+5A824vBSkQy/hB3fZepoVEf8OVAxzLvK+H/jm9TzpI3ETSm64Kg==
11189-
1119011154
recursive-readdir@^2.2.2:
1119111155
version "2.2.3"
1119211156
resolved "https://registry.yarnpkg.com/recursive-readdir/-/recursive-readdir-2.2.3.tgz#e726f328c0d69153bcabd5c322d3195252379372"
@@ -11514,7 +11478,7 @@ resolve-url@^0.2.1:
1151411478
resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
1151511479
integrity sha512-ZuF55hVUQaaczgOIwqWzkEcEidmlD/xl44x1UZnhOXcYuFN2S6+rcxpG+C1N3So0wvNI3DmJICUFfu2SxhBmvg==
1151611480

11517-
resolve@^1.10.0, resolve@^1.12.0, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.22.4, resolve@^1.3.2:
11481+
resolve@^1.10.0, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.22.4, resolve@^1.3.2:
1151811482
version "1.22.8"
1151911483
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.8.tgz#b6c87a9f2aa06dfab52e3d70ac8cde321fa5a48d"
1152011484
integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==

0 commit comments

Comments
 (0)