Skip to content

Commit

Permalink
Update docusaurus to 2.2.0 (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
e-im committed Oct 29, 2022
1 parent dcd415c commit 71bc100
Show file tree
Hide file tree
Showing 5 changed files with 450 additions and 366 deletions.
55 changes: 0 additions & 55 deletions .yarn/patches/@docusaurus-core-npm-2.1.0-ee70472f68.patch

This file was deleted.

53 changes: 23 additions & 30 deletions docusaurus.config.ts
Expand Up @@ -9,7 +9,7 @@ import { Options } from "@docusaurus/plugin-content-docs";

const preview = env.VERCEL_ENV === "preview";

const url = (preview && env.VERCEL_URL) || "https://docs.papermc.io";
const url = (preview && `https://${env.VERCEL_URL}`) || "https://docs.papermc.io";

const docsCommon: Options = {
breadcrumbs: true,
Expand Down Expand Up @@ -48,6 +48,28 @@ const config: Config = {
}),
},

headTags: [
{
tagName: "script",
attributes: {
type: "application/ld+json",
},
innerHTML: JSON.stringify({
"@context": "https://schema.org",
"@type": "WebSite",
url,
potentialAction: {
"@type": "SearchAction",
target: {
"@type": "EntryPoint",
urlTemplate: `${url}/search?q={search_term_string}`,
},
"query-input": "required name=search_term_string",
},
}),
},
],

themes: ["@docusaurus/theme-classic", "@docusaurus/theme-search-algolia"],

plugins: [
Expand Down Expand Up @@ -127,35 +149,6 @@ const config: Config = {
],
},
],
() => ({
name: "docusaurus-plugin-custom-tags",

injectHtmlTags() {
return {
headTags: [
{
tagName: "script",
attributes: {
type: "application/ld+json",
},
innerHTML: JSON.stringify({
"@context": "https://schema.org",
"@type": "WebSite",
url: url,
potentialAction: {
"@type": "SearchAction",
target: {
"@type": "EntryPoint",
urlTemplate: `${url}/search?q={search_term_string}`,
},
"query-input": "required name=search_term_string",
},
}),
},
],
};
},
}),
[
"@docusaurus/plugin-sitemap",
{
Expand Down
29 changes: 14 additions & 15 deletions package.json
Expand Up @@ -22,15 +22,15 @@
"prepare": "yarn meta:build"
},
"dependencies": {
"@docusaurus/core": "2.1.0",
"@docusaurus/plugin-content-docs": "2.1.0",
"@docusaurus/plugin-content-pages": "2.1.0",
"@docusaurus/plugin-debug": "2.1.0",
"@docusaurus/plugin-pwa": "2.1.0",
"@docusaurus/plugin-sitemap": "2.1.0",
"@docusaurus/theme-classic": "2.1.0",
"@docusaurus/theme-common": "2.1.0",
"@docusaurus/theme-search-algolia": "2.1.0",
"@docusaurus/core": "2.2.0",
"@docusaurus/plugin-content-docs": "2.2.0",
"@docusaurus/plugin-content-pages": "2.2.0",
"@docusaurus/plugin-debug": "2.2.0",
"@docusaurus/plugin-pwa": "2.2.0",
"@docusaurus/plugin-sitemap": "2.2.0",
"@docusaurus/theme-classic": "2.2.0",
"@docusaurus/theme-common": "2.2.0",
"@docusaurus/theme-search-algolia": "2.2.0",
"@fontsource/jetbrains-mono": "4.5.11",
"@mdx-js/react": "1.6.22",
"clsx": "1.2.1",
Expand All @@ -39,15 +39,15 @@
"react-dom": "17.0.2"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "2.1.0",
"@docusaurus/types": "2.1.0",
"@docusaurus/module-type-aliases": "2.2.0",
"@docusaurus/types": "2.2.0",
"@fec/remark-a11y-emoji": "3.1.0",
"@tsconfig/docusaurus": "1.0.6",
"@types/is-ci": "3.0.0",
"@types/node": "17.0.45",
"@types/prettier": "2.7.1",
"concurrently": "7.4.0",
"esbuild": "0.15.11",
"concurrently": "7.5.0",
"esbuild": "0.15.12",
"esbuild-loader": "2.20.0",
"is-ci": "3.0.1",
"prettier": "2.7.1",
Expand All @@ -69,7 +69,6 @@
},
"packageManager": "yarn@3.2.1",
"resolutions": {
"@docusaurus/plugin-content-docs@2.1.0": "patch:@docusaurus/plugin-content-docs@npm:2.1.0#.yarn/patches/@docusaurus-plugin-content-docs-npm-2.1.0-e33a6bac60.patch",
"@docusaurus/core@2.1.0": "patch:@docusaurus/core@npm:2.1.0#.yarn/patches/@docusaurus-core-npm-2.1.0-ee70472f68.patch"
"@docusaurus/plugin-content-docs@2.2.0": "patch:@docusaurus/plugin-content-docs@npm:2.2.0#.yarn/patches/@docusaurus-plugin-content-docs-npm-2.2.0-34ac512661.patch"
}
}

0 comments on commit 71bc100

Please sign in to comment.