From 579a095c78009489fdb6f86ffde922e67a1f881c Mon Sep 17 00:00:00 2001 From: Eugene Kotsarev Date: Mon, 11 Mar 2024 15:04:32 +0300 Subject: [PATCH] Update site config and welcome page (#85) --- .gitignore | 4 +- docs/welcome.md | 1 + docusaurus.config.js => docusaurus.config.ts | 43 +++++++------------- package.json | 9 ++-- tsconfig.json | 2 +- yarn.lock | 17 +++++--- 6 files changed, 36 insertions(+), 40 deletions(-) rename docusaurus.config.js => docusaurus.config.ts (70%) diff --git a/.gitignore b/.gitignore index e6e9ac43..3ced74ee 100644 --- a/.gitignore +++ b/.gitignore @@ -17,4 +17,6 @@ npm-debug.log* yarn-debug.log* -yarn-error.log* \ No newline at end of file +yarn-error.log* + +.idea diff --git a/docs/welcome.md b/docs/welcome.md index a2997765..3e37a812 100644 --- a/docs/welcome.md +++ b/docs/welcome.md @@ -1,4 +1,5 @@ --- +title: '' hide_title: true sidebar_position: 1 sidebar_label: Welcome! diff --git a/docusaurus.config.js b/docusaurus.config.ts similarity index 70% rename from docusaurus.config.js rename to docusaurus.config.ts index 7bbafcc8..8f46db8c 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.ts @@ -1,27 +1,25 @@ -// @ts-check -// Note: type annotations allow type checking and IDEs autocompletion +import type {Config} from '@docusaurus/types'; +import type * as Preset from '@docusaurus/preset-classic'; const lightCodeTheme = require('prism-react-renderer').themes.github const darkCodeTheme = require('prism-react-renderer').themes.dracula -/** @type {import('@docusaurus/types').Config} */ -const config = { - title: 'Whitepaper website', - tagline: 'Vision of the next-generation smart contract network', - url: 'https://whitepaper.gear-tech.io', +const config: Config = { + title: 'Gear Whitepaper', + url: 'https://whitepaper.gear.foundation/', baseUrl: '/', - trailingSlash: false, + favicon: '/img/favicon-32x32.png', + tagline: 'Vision of the next-generation smart contract network', onBrokenLinks: 'log', onBrokenMarkdownLinks: 'log', onDuplicateRoutes: 'log', - favicon: '/img/favicon-32x32.png', - organizationName: 'Gear Technologies', // Usually your GitHub org/user name. - projectName: 'Whitepaper', // Usually your repo name. + organizationName: 'Gear Technologies', // Usually your GitHub org/username. + projectName: 'gear-whitepaper', // Usually your repo name. + trailingSlash: false, presets: [ [ 'classic', - /** @type {import('@docusaurus/preset-classic').Options} */ ({ docs: { path: './docs', @@ -32,17 +30,16 @@ const config = { theme: { customCss: require.resolve('./src/css/custom.css'), }, - }), + } satisfies Preset.Options), ], ], themeConfig: - /** @type {import('@docusaurus/preset-classic').ThemeConfig} */ - ({ + { colorMode: { defaultMode: 'light', }, - image: 'img/wp-preview.jpg', + image: '/img/wp-preview.jpg', navbar: { title: 'Gear Whitepaper', logo: { @@ -73,17 +70,7 @@ const config = { autoCollapseCategories: true, }, }, - }), - - headTags: [ - { - tagName: 'meta', - attributes: { - property: 'og:image', - content: '/img/wp-preview.jpg', - }, - }, - ], + } satisfies Preset.ThemeConfig, } -module.exports = config +export default config diff --git a/package.json b/package.json index 5bc79c24..32d8e891 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,5 @@ { - "name": "my-website", - "version": "0.0.0", + "name": "gear-whitepaper", "private": true, "scripts": { "docusaurus": "docusaurus", @@ -25,9 +24,11 @@ "react-dom": "^18.2.0" }, "devDependencies": { - "@docusaurus/module-type-aliases": "^3.0.0", + "@docusaurus/module-type-aliases": "^3.1.1", + "@docusaurus/tsconfig": "^3.1.1", + "@docusaurus/types": "^3.1.1", "@tsconfig/docusaurus": "^2.0.2", - "typescript": "^5.3.3" + "typescript": "^5.4.2" }, "browserslist": { "production": [ diff --git a/tsconfig.json b/tsconfig.json index 6f475698..314eab8a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,6 +1,6 @@ { // This file is not used in compilation. It is here just for a nice editor experience. - "extends": "@tsconfig/docusaurus/tsconfig.json", + "extends": "@docusaurus/tsconfig", "compilerOptions": { "baseUrl": "." } diff --git a/yarn.lock b/yarn.lock index 6b4039ea..6a36eafb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1412,7 +1412,7 @@ vfile "^6.0.1" webpack "^5.88.1" -"@docusaurus/module-type-aliases@3.1.1", "@docusaurus/module-type-aliases@^3.0.0": +"@docusaurus/module-type-aliases@3.1.1", "@docusaurus/module-type-aliases@^3.1.1": version "3.1.1" resolved "https://registry.yarnpkg.com/@docusaurus/module-type-aliases/-/module-type-aliases-3.1.1.tgz#b304402b0535a13ebd4c0db1c368d2604d54d02f" integrity sha512-xBJyx0TMfAfVZ9ZeIOb1awdXgR4YJMocIEzTps91rq+hJDFJgJaylDtmoRhUxkwuYmNK1GJpW95b7DLztSBJ3A== @@ -1651,7 +1651,12 @@ fs-extra "^11.1.1" tslib "^2.6.0" -"@docusaurus/types@3.1.1": +"@docusaurus/tsconfig@^3.1.1": + version "3.1.1" + resolved "https://registry.yarnpkg.com/@docusaurus/tsconfig/-/tsconfig-3.1.1.tgz#ee2297ea94f4059b69f4b9bff238c212eede65e9" + integrity sha512-FTBuY3KvaHfMVBgvlPmDQ+KS9Q/bYtVftq2ugou3PgBDJoQmw2aUZ4Sg15HKqLGbfIkxoy9t6cqE4Yw1Ta8Q1A== + +"@docusaurus/types@3.1.1", "@docusaurus/types@^3.1.1": version "3.1.1" resolved "https://registry.yarnpkg.com/@docusaurus/types/-/types-3.1.1.tgz#747c9dee8cf7c3b0e5ee7351bac5e9c4fdc7f259" integrity sha512-grBqOLnubUecgKFXN9q3uit2HFbCxTWX4Fam3ZFbMN0sWX9wOcDoA7lwdX/8AmeL20Oc4kQvWVgNrsT8bKRvzg== @@ -7966,10 +7971,10 @@ typedarray-to-buffer@^3.1.5: dependencies: is-typedarray "^1.0.0" -typescript@^5.3.3: - version "5.3.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37" - integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== +typescript@^5.4.2: + version "5.4.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.2.tgz#0ae9cebcfae970718474fe0da2c090cad6577372" + integrity sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ== unicode-canonical-property-names-ecmascript@^2.0.0: version "2.0.0"