From eff089a26cee88e9de9ccfa3c96952e64dbbfc3a Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Mon, 30 May 2022 10:15:40 +0300 Subject: [PATCH] docs: Add sitemap to API reference (#1581) --- www/reference/gatsby-config.js | 9 +++++- www/reference/package.json | 1 + www/reference/yarn.lock | 51 +++++++++++++++++++++++++++++++++- 3 files changed, 59 insertions(+), 2 deletions(-) diff --git a/www/reference/gatsby-config.js b/www/reference/gatsby-config.js index 90d5467b25..570d1dcc7e 100644 --- a/www/reference/gatsby-config.js +++ b/www/reference/gatsby-config.js @@ -3,6 +3,7 @@ module.exports = { title: "Medusa", description: "Open-source headless commerce engine", author: "Medusa core team", + siteUrl: "https://docs.medusajs.com/api" }, plugins: [ `gatsby-plugin-react-helmet`, @@ -65,6 +66,12 @@ module.exports = { allowList: ["ALGOLIA_API_KEY"], }, }, + { + resolve: `gatsby-plugin-sitemap`, + options: { + output: '/api/sitemap' + } + } // `gatsby-plugin-preact`, // { // resolve: `gatsby-source-openapi-aggregate`, @@ -73,7 +80,7 @@ module.exports = { // { // name: "admin-spec", // resolve: () => - // fromJson( + // fromJson(`` // path.resolve(__dirname, "../../docs/api/admin-spec3.json") // ), // }, diff --git a/www/reference/package.json b/www/reference/package.json index 1f0b25af62..32aca47836 100644 --- a/www/reference/package.json +++ b/www/reference/package.json @@ -28,6 +28,7 @@ "gatsby-plugin-env-variables": "^2.1.0", "gatsby-plugin-preact": "^5.9.0", "gatsby-plugin-react-helmet": "^3.3.12", + "gatsby-plugin-sitemap": "^5.15.0", "gatsby-plugin-theme-ui": "^0.10.1", "gatsby-remark-autolink-headers": "^4.6.0", "gatsby-source-filesystem": "^3.9.0", diff --git a/www/reference/yarn.lock b/www/reference/yarn.lock index 3bf9eec530..aa55232e5b 100644 --- a/www/reference/yarn.lock +++ b/www/reference/yarn.lock @@ -2225,6 +2225,11 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.34.tgz#fe4b38b3f07617c0fa31ae923fca9249641038f0" integrity sha512-USUftMYpmuMzeWobskoPfzDi+vkpe0dvcOBRNOscFrGxVp4jomnRxWuVohgqBow2xyIPC0S3gjxV/5079jhmDg== +"@types/node@^17.0.5": + version "17.0.35" + resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.35.tgz#635b7586086d51fb40de0a2ec9d1014a5283ba4a" + integrity sha512-vu1SrqBjbbZ3J6vwY17jBs8Sr/BKA+/a/WtjRG+whKg1iuLFOosq872EXS0eXWILdO36DHQQeku/ZcL6hz2fpg== + "@types/node@^8.5.7": version "8.10.66" resolved "https://registry.yarnpkg.com/@types/node/-/node-8.10.66.tgz#dd035d409df322acc83dff62a602f12a5783bbb3" @@ -2276,6 +2281,13 @@ "@types/glob" "*" "@types/node" "*" +"@types/sax@^1.2.1": + version "1.2.4" + resolved "https://registry.yarnpkg.com/@types/sax/-/sax-1.2.4.tgz#8221affa7f4f3cb21abd22f244cfabfa63e6a69e" + integrity sha512-pSAff4IAxJjfAXUG6tFkO7dsSbTmf8CtUpfhhZ5VhkRpC4628tJhh3+V6H1E+/Gs9piSzYKT5yzHO5M4GG9jkw== + dependencies: + "@types/node" "*" + "@types/scheduler@*": version "0.16.2" resolved "https://registry.yarnpkg.com/@types/scheduler/-/scheduler-0.16.2.tgz#1a62f89525723dde24ba1b01b092bf5df8ad4d39" @@ -2717,6 +2729,11 @@ arg@^4.1.0: resolved "https://registry.yarnpkg.com/arg/-/arg-4.1.3.tgz#269fc7ad5b8e42cb63c896d5666017261c144089" integrity sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA== +arg@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/arg/-/arg-5.0.1.tgz#eb0c9a8f77786cad2af8ff2b862899842d7b6adb" + integrity sha512-e0hDa9H2Z9AwFkk2qDlwhoMYE4eToKarchkQHovNdLTCYMHZHeRjI71crOh+dio4K6u1IcwubQqo79Ga4CyAQA== + argparse@^1.0.7: version "1.0.10" resolved "https://registry.yarnpkg.com/argparse/-/argparse-1.0.10.tgz#bcd6791ea5ae09725e17e5ad988134cd40b3d911" @@ -3572,7 +3589,7 @@ commander@^7.2.0: resolved "https://registry.yarnpkg.com/commander/-/commander-7.2.0.tgz#a36cb57d0b501ce108e4d20559a150a391d97ab7" integrity sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw== -common-tags@^1.8.0: +common-tags@^1.8.0, common-tags@^1.8.2: version "1.8.2" resolved "https://registry.yarnpkg.com/common-tags/-/common-tags-1.8.2.tgz#94ebb3c076d26032745fd54face7f688ef5ac9c6" integrity sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA== @@ -5425,6 +5442,16 @@ gatsby-plugin-react-helmet@^3.3.12: dependencies: "@babel/runtime" "^7.12.5" +gatsby-plugin-sitemap@^5.15.0: + version "5.15.0" + resolved "https://registry.yarnpkg.com/gatsby-plugin-sitemap/-/gatsby-plugin-sitemap-5.15.0.tgz#6035eb3a80de90dda3356deea083653e483fef5f" + integrity sha512-2G7ooRqwOHe3zItd2WoOVEbqnFBXaQSQ2whxug3LAJr7PbZa33kukRQQcjK6v5IO5HidWAFpP9t1a5LOIeDpCw== + dependencies: + "@babel/runtime" "^7.15.4" + common-tags "^1.8.2" + minimatch "^3.1.2" + sitemap "^7.0.0" + gatsby-plugin-theme-ui@^0.10.1: version "0.10.1" resolved "https://registry.yarnpkg.com/gatsby-plugin-theme-ui/-/gatsby-plugin-theme-ui-0.10.1.tgz#d1ac7f4f1c4bf187694110a8670f0bb3ff470ad2" @@ -8250,6 +8277,13 @@ minimatch@3.0.4, minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" +minimatch@^3.1.2: + version "3.1.2" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" + integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== + dependencies: + brace-expansion "^1.1.7" + minimist@^1.1.0, minimist@^1.2.0, minimist@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" @@ -10154,6 +10188,11 @@ sanitize-html@^1.27.5: parse-srcset "^1.0.2" postcss "^7.0.27" +sax@^1.2.4: + version "1.2.4" + resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9" + integrity sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw== + scheduler@^0.19.1: version "0.19.1" resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.19.1.tgz#4f3e2ed2c1a7d65681f4c854fa8c5a1ccb40f196" @@ -10359,6 +10398,16 @@ sisteransi@^1.0.5: resolved "https://registry.yarnpkg.com/sisteransi/-/sisteransi-1.0.5.tgz#134d681297756437cc05ca01370d3a7a571075ed" integrity sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg== +sitemap@^7.0.0: + version "7.1.1" + resolved "https://registry.yarnpkg.com/sitemap/-/sitemap-7.1.1.tgz#eeed9ad6d95499161a3eadc60f8c6dce4bea2bef" + integrity sha512-mK3aFtjz4VdJN0igpIJrinf3EO8U8mxOPsTBzSsy06UtjZQJ3YY3o3Xa7zSc5nMqcMrRwlChHZ18Kxg0caiPBg== + dependencies: + "@types/node" "^17.0.5" + "@types/sax" "^1.2.1" + arg "^5.0.0" + sax "^1.2.4" + slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"