Skip to content

Commit 3706955

Browse files
committed
feat: hide sitebar
1 parent c35d0f7 commit 3706955

File tree

7 files changed

+102
-19
lines changed

7 files changed

+102
-19
lines changed

.eslintrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"extends": ["plugin:@docusaurus/recommended"],
3+
"plugins": ["@docusaurus"],
4+
"rules": {
5+
"@docusaurus/no-untranslated-text": "warn"
6+
}
7+
}

docs/intro.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,6 @@ npm run start
4242

4343
The `cd` command changes the directory you're working with. In order to work with your newly created Docusaurus site, you'll need to navigate the terminal there.
4444

45-
The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at http://localhost:3000/.
45+
The `npm run start` command builds your website locally and serves it through a development server, ready for you to view at <http://localhost:3000/>.
4646

4747
Open `docs/intro.md` (this page) and edit some lines: the site **reloads automatically** and displays your changes.

docusaurus.config.js

+1-15
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const config = {
1616

1717
// GitHub pages deployment config.
1818
// If you aren't using GitHub pages, you don't need these.
19-
organizationName: 'segmentfault', // Usually your GitHub org/user name.
19+
organizationName: 'answerdev', // Usually your GitHub org/user name.
2020
projectName: 'Answer', // Usually your repo name.
2121

2222
// Even if you don't use internalization, you can use this field to set useful
@@ -32,20 +32,6 @@ const config = {
3232
'classic',
3333
/** @type {import('@docusaurus/preset-classic').Options} */
3434
({
35-
docs: {
36-
sidebarPath: require.resolve('./sidebars.js'),
37-
// Please change this to your repo.
38-
// Remove this to remove the "edit this page" links.
39-
editUrl:
40-
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
41-
},
42-
blog: {
43-
showReadingTime: true,
44-
// Please change this to your repo.
45-
// Remove this to remove the "edit this page" links.
46-
editUrl:
47-
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
48-
},
4935
theme: {
5036
customCss: require.resolve('./src/css/custom.css'),
5137
},

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
"react-smooth-corners": "^1.0.4"
2626
},
2727
"devDependencies": {
28+
"@docusaurus/eslint-plugin": "^2.1.0",
2829
"@docusaurus/module-type-aliases": "2.1.0",
2930
"@tsconfig/docusaurus": "^1.0.5",
3031
"typescript": "^4.7.4"

src/css/custom.css

+3
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,7 @@ img {
103103

104104
.navbar-sidebar__brand {
105105
background-color: var(--ifm-color-primary);
106+
}
107+
.navbar__toggle {
108+
display: none;
106109
}

tsconfig.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
// This file is not used in compilation. It is here just for a nice editor experience.
33
"extends": "@tsconfig/docusaurus/tsconfig.json",
44
"compilerOptions": {
5-
"baseUrl": "."
5+
"lib": ["DOM", "ESNext"],
6+
"baseUrl": ".",
7+
"resolveJsonModule": true,
68
}
79
}

yarn.lock

+86-2
Original file line numberDiff line numberDiff line change
@@ -1329,6 +1329,14 @@
13291329
postcss-sort-media-queries "^4.2.1"
13301330
tslib "^2.4.0"
13311331

1332+
"@docusaurus/eslint-plugin@^2.1.0":
1333+
version "2.1.0"
1334+
resolved "https://registry.npmmirror.com/@docusaurus/eslint-plugin/-/eslint-plugin-2.1.0.tgz#c1d6718d82cb3cfa6d757c456bc08802f2f4759d"
1335+
integrity sha512-OCMGVORXDEXyPMjY9Qnoyd6THT/2wxtOgkMm3FZf2EHWVJB+EJap0Q2slCNViyvhryb2qpQT5vIIDSP5UAz8bA==
1336+
dependencies:
1337+
"@typescript-eslint/utils" "^5.30.5"
1338+
tslib "^2.4.0"
1339+
13321340
"@docusaurus/[email protected]":
13331341
version "2.1.0"
13341342
resolved "https://registry.npmmirror.com/@docusaurus/logger/-/logger-2.1.0.tgz#86c97e948f578814d3e61fc2b2ad283043cbe87a"
@@ -2232,6 +2240,53 @@
22322240
dependencies:
22332241
"@types/yargs-parser" "*"
22342242

2243+
"@typescript-eslint/[email protected]":
2244+
version "5.40.0"
2245+
resolved "https://registry.npmmirror.com/@typescript-eslint/scope-manager/-/scope-manager-5.40.0.tgz#d6ea782c8e3a2371ba3ea31458dcbdc934668fc4"
2246+
integrity sha512-d3nPmjUeZtEWRvyReMI4I1MwPGC63E8pDoHy0BnrYjnJgilBD3hv7XOiETKLY/zTwI7kCnBDf2vWTRUVpYw0Uw==
2247+
dependencies:
2248+
"@typescript-eslint/types" "5.40.0"
2249+
"@typescript-eslint/visitor-keys" "5.40.0"
2250+
2251+
"@typescript-eslint/[email protected]":
2252+
version "5.40.0"
2253+
resolved "https://registry.npmmirror.com/@typescript-eslint/types/-/types-5.40.0.tgz#8de07e118a10b8f63c99e174a3860f75608c822e"
2254+
integrity sha512-V1KdQRTXsYpf1Y1fXCeZ+uhjW48Niiw0VGt4V8yzuaDTU8Z1Xl7yQDyQNqyAFcVhpYXIVCEuxSIWTsLDpHgTbw==
2255+
2256+
"@typescript-eslint/[email protected]":
2257+
version "5.40.0"
2258+
resolved "https://registry.npmmirror.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.40.0.tgz#e305e6a5d65226efa5471ee0f12e0ffaab6d3075"
2259+
integrity sha512-b0GYlDj8TLTOqwX7EGbw2gL5EXS2CPEWhF9nGJiGmEcmlpNBjyHsTwbqpyIEPVpl6br4UcBOYlcI2FJVtJkYhg==
2260+
dependencies:
2261+
"@typescript-eslint/types" "5.40.0"
2262+
"@typescript-eslint/visitor-keys" "5.40.0"
2263+
debug "^4.3.4"
2264+
globby "^11.1.0"
2265+
is-glob "^4.0.3"
2266+
semver "^7.3.7"
2267+
tsutils "^3.21.0"
2268+
2269+
"@typescript-eslint/utils@^5.30.5":
2270+
version "5.40.0"
2271+
resolved "https://registry.npmmirror.com/@typescript-eslint/utils/-/utils-5.40.0.tgz#647f56a875fd09d33c6abd70913c3dd50759b772"
2272+
integrity sha512-MO0y3T5BQ5+tkkuYZJBjePewsY+cQnfkYeRqS6tPh28niiIwPnQ1t59CSRcs1ZwJJNOdWw7rv9pF8aP58IMihA==
2273+
dependencies:
2274+
"@types/json-schema" "^7.0.9"
2275+
"@typescript-eslint/scope-manager" "5.40.0"
2276+
"@typescript-eslint/types" "5.40.0"
2277+
"@typescript-eslint/typescript-estree" "5.40.0"
2278+
eslint-scope "^5.1.1"
2279+
eslint-utils "^3.0.0"
2280+
semver "^7.3.7"
2281+
2282+
"@typescript-eslint/[email protected]":
2283+
version "5.40.0"
2284+
resolved "https://registry.npmmirror.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.40.0.tgz#dd2d38097f68e0d2e1e06cb9f73c0173aca54b68"
2285+
integrity sha512-ijJ+6yig+x9XplEpG2K6FUdJeQGGj/15U3S56W9IqXKJqleuD7zJ2AX/miLezwxpd7ZxDAqO87zWufKg+RPZyQ==
2286+
dependencies:
2287+
"@typescript-eslint/types" "5.40.0"
2288+
eslint-visitor-keys "^3.3.0"
2289+
22352290
"@webassemblyjs/[email protected]":
22362291
version "1.11.1"
22372292
resolved "https://registry.npmmirror.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7"
@@ -3388,7 +3443,7 @@ [email protected], debug@^2.6.0:
33883443
dependencies:
33893444
ms "2.0.0"
33903445

3391-
debug@4, debug@^4.1.0, debug@^4.1.1:
3446+
debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.4:
33923447
version "4.3.4"
33933448
resolved "https://registry.npmmirror.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
33943449
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
@@ -3702,14 +3757,31 @@ escape-string-regexp@^4.0.0:
37023757
resolved "https://registry.npmmirror.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
37033758
integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==
37043759

3705-
3760+
[email protected], eslint-scope@^5.1.1:
37063761
version "5.1.1"
37073762
resolved "https://registry.npmmirror.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c"
37083763
integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==
37093764
dependencies:
37103765
esrecurse "^4.3.0"
37113766
estraverse "^4.1.1"
37123767

3768+
eslint-utils@^3.0.0:
3769+
version "3.0.0"
3770+
resolved "https://registry.npmmirror.com/eslint-utils/-/eslint-utils-3.0.0.tgz#8aebaface7345bb33559db0a1f13a1d2d48c3672"
3771+
integrity sha512-uuQC43IGctw68pJA1RgbQS8/NP7rch6Cwd4j3ZBtgo4/8Flj4eGE7ZYSZRN3iq5pVUv6GPdW5Z1RFleo84uLDA==
3772+
dependencies:
3773+
eslint-visitor-keys "^2.0.0"
3774+
3775+
eslint-visitor-keys@^2.0.0:
3776+
version "2.1.0"
3777+
resolved "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303"
3778+
integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==
3779+
3780+
eslint-visitor-keys@^3.3.0:
3781+
version "3.3.0"
3782+
resolved "https://registry.npmmirror.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826"
3783+
integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==
3784+
37133785
esprima@^4.0.0:
37143786
version "4.0.1"
37153787
resolved "https://registry.npmmirror.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
@@ -7112,11 +7184,23 @@ trough@^1.0.0:
71127184
resolved "https://registry.npmmirror.com/trough/-/trough-1.0.5.tgz#b8b639cefad7d0bb2abd37d433ff8293efa5f406"
71137185
integrity sha512-rvuRbTarPXmMb79SmzEp8aqXNKcK+y0XaB298IXueQ8I2PsrATcPBCSPyK/dDNa2iWOhKlfNnOjdAOTBU/nkFA==
71147186

7187+
tslib@^1.8.1:
7188+
version "1.14.1"
7189+
resolved "https://registry.npmmirror.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
7190+
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
7191+
71157192
tslib@^2.0.3, tslib@^2.1.0, tslib@^2.4.0:
71167193
version "2.4.0"
71177194
resolved "https://registry.npmmirror.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"
71187195
integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==
71197196

7197+
tsutils@^3.21.0:
7198+
version "3.21.0"
7199+
resolved "https://registry.npmmirror.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"
7200+
integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==
7201+
dependencies:
7202+
tslib "^1.8.1"
7203+
71207204
type-fest@^0.20.2:
71217205
version "0.20.2"
71227206
resolved "https://registry.npmmirror.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4"

0 commit comments

Comments
 (0)