Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 547
chore(website): upgrade Docusaurus, format files, add shiki-twoslash#1645
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
0395a19e34a3b0bfa3e69f8e052db34fa816080b7ecf87758135ec4bb4a712947dbfa4File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -19,7 +19,7 @@ module.exports = { | ||
| // //isCloseable: false, // Defaults to `true`. | ||
| // }, | ||
| colorMode: { | ||
| respectPrefersColorScheme: true | ||
| respectPrefersColorScheme: true, | ||
| }, | ||
| navbar: { | ||
| title: 'ts-node', | ||
| @@ -61,6 +61,20 @@ module.exports = { | ||
| }, | ||
| ], | ||
| }, | ||
| metadata: [ | ||
| { | ||
| name: 'msapplication-TileColor', | ||
| content: '#2b5797', | ||
| }, | ||
| { | ||
| name: 'msapplication-config', | ||
| content: '/ts-node/img/favicon/browserconfig.xml', | ||
| }, | ||
| { | ||
| name: 'theme-color', | ||
| content: '#ffffff', | ||
| }, | ||
| ], | ||
| // footer: { | ||
| // style: 'dark', | ||
| // links: [ | ||
| @@ -99,23 +113,14 @@ module.exports = { | ||
| // // copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`, | ||
| // }, | ||
| prism: { | ||
| // for syntax highlighting | ||
| // additionalLanguages: ['powershell'], | ||
| // Note: these themes are ignored due to using shiki-twoslash | ||
| theme: require('prism-react-renderer/themes/vsLight'), | ||
| darkTheme: require('prism-react-renderer/themes/vsDark'), | ||
| }, | ||
| algolia: { | ||
| apiKey: 'c882a0a136ef4e15aa99db604280caa6', | ||
| appId: 'BYGNLKSCOV', | ||
| apiKey: '74ac2b781b0cf603c2f1b5e4f44e1c69', | ||
| indexName: 'ts-node', | ||
| // Optional: see doc section below | ||
| // contextualSearch: true, | ||
| // Optional: see doc section below | ||
| // appId: 'YOUR_APP_ID', | ||
| // Optional: Algolia search parameters | ||
| // searchParameters: {}, | ||
| //... other Algolia params | ||
| }, | ||
| }, | ||
| presets: [ | ||
| @@ -124,19 +129,67 @@ module.exports = { | ||
| { | ||
| docs: { | ||
| sidebarPath: require.resolve('./sidebars.js'), | ||
| editUrl: | ||
| 'https://github.com/TypeStrong/ts-node/edit/docs/website/', | ||
| editUrl: 'https://github.com/TypeStrong/ts-node/edit/docs/website/', | ||
| }, | ||
| // blog: { | ||
| // showReadingTime: true, | ||
| // // Please change this to your repo. | ||
| // editUrl: | ||
| // 'https://github.com/facebook/docusaurus/edit/master/website/blog/', | ||
| // }, | ||
| blog: false, | ||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
| ||
| theme: { | ||
| customCss: require.resolve('./src/css/custom.css'), | ||
| }, | ||
| }, | ||
| ], | ||
| [ | ||
| 'docusaurus-preset-shiki-twoslash', | ||
| { | ||
| // https://github.com/shikijs/twoslash/blob/main/packages/shiki-twoslash/README.md#user-settings | ||
| // langs: ["shell", "typescript", "javascript", "ts", "js", "tsx", "jsx", "json", "jsonc"], | ||
| includeJSDocInHover: true, | ||
| themes: ['github-light', 'nord'], | ||
| // VSCode default | ||
| // themes: ["light-plus", "dark-plus"], | ||
| // Other options | ||
| // themes: ["min-light", "nord"], | ||
| // themes: ["min-light", "min-dark"], | ||
| // themes: ["github-light", "github-dark"], | ||
| // themes: ["solarized-light", "solarized-dark"], | ||
| }, | ||
| ], | ||
| ], | ||
| // Misleading API that probably will be refactored in Docusaurus, but this is | ||
| // simply a list of <link> tags | ||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's more like a note to myself. I have this comment on multiple websites I helped set up now, but I still can't think of a better API. We'll probably have an | ||
| stylesheets: [ | ||
| { | ||
| rel: 'apple-touch-icon', | ||
| sizes: '180x180', | ||
| href: '/ts-node/img/favicon/apple-touch-icon.png', | ||
| }, | ||
| { | ||
| rel: 'icon', | ||
| type: 'image/png', | ||
| sizes: '32x32', | ||
| href: '/ts-node/img/favicon/favicon-32x32.png', | ||
| }, | ||
| { | ||
| rel: 'icon', | ||
| type: 'image/png', | ||
| sizes: '16x16', | ||
| href: '/ts-node/img/favicon/favicon-16x16.png', | ||
| }, | ||
| { | ||
| rel: 'manifest', | ||
| href: '/ts-node/img/favicon/site.webmanifest', | ||
| }, | ||
| { | ||
| rel: 'mask-icon', | ||
| href: '/ts-node/img/favicon/safari-pinned-tab.svg', | ||
| color: '#5bbad5', | ||
| }, | ||
| { | ||
| rel: 'shortcut icon', | ||
| href: '/ts-node/img/favicon/favicon.ico', | ||
| }, | ||
| ], | ||
Collaborator There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks new, what does it do? ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above, just a replacement for the head tags so they show up on every page. | ||
| }; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -13,15 +13,15 @@ | ||
| "build-readme": "./scripts/build-readme.mjs" | ||
| }, | ||
| "dependencies": { | ||
| "@docusaurus/core": "2.0.0-alpha.75", | ||
| "@docusaurus/preset-classic": "2.0.0-alpha.75", | ||
| "@docusaurus/theme-search-algolia": "^2.0.0-alpha.75", | ||
cspotcode marked this conversation as resolved.
Uh oh!There was an error while loading. Please reload this page. | ||
| "@mdx-js/react": "^1.6.21", | ||
| "@docusaurus/core": "2.0.0-beta.17", | ||
| "@docusaurus/preset-classic": "2.0.0-beta.17", | ||
| "@mdx-js/react": "^1.6.22", | ||
| "@types/js-yaml": "^4.0.0", | ||
| "clsx": "^1.1.1", | ||
| "docusaurus-preset-shiki-twoslash": "^1.1.36", | ||
| "js-yaml": "^4.0.0", | ||
| "react": "^16.8.4", | ||
| "react-dom": "^16.8.4", | ||
| "react": "^17.0.2", | ||
| "react-dom": "^17.0.2", | ||
| "remark": "^13.0.0", | ||
| "remark-behead": "^2.3.3", | ||
| "remark-frontmatter": "^3.0.0", | ||
| @@ -42,5 +42,10 @@ | ||
| "last 1 firefox version", | ||
| "last 1 safari version" | ||
| ] | ||
| }, | ||
| "packageManager": "yarn@1.22.17", | ||
| "volta": { | ||
| "extends": "../package.json", | ||
| "yarn": "1.22.17" | ||
| } | ||
| } | ||
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks new, what does it do? Do we need to make these colors match something else in our config?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a replacement for the
<Head>tags you had inindex.jsbefore.