-
-
Notifications
You must be signed in to change notification settings - Fork 539
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
chore(website): upgrade Docusaurus, format files, add shiki-twoslash #1645
Changes from 1 commit
0395a19
e34a3b0
bfa3e69
f8e052d
b34fa81
6080b7e
cf87758
135ec4b
b4a7129
47dbfa4
File filter
Filter by extension
Conversations
Jump to
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: [ | ||
|
@@ -124,9 +138,9 @@ 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: false, | ||
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.
|
||
// blog: { | ||
// showReadingTime: true, | ||
// // Please change this to your repo. | ||
|
@@ -139,4 +153,38 @@ module.exports = { | |
}, | ||
], | ||
], | ||
// Misleading API, probably will be refactored in Docusaurus, but this is | ||
// simply a list of <link> tags | ||
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', | ||
}, | ||
], | ||
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? 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,9 +13,9 @@ | |
"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.
Show resolved
Hide resolved
|
||
"@docusaurus/core": "2.0.0-beta.15", | ||
"@docusaurus/preset-classic": "2.0.0-beta.15", | ||
"@docusaurus/theme-search-algolia": "2.0.0-beta.15", | ||
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. I forgot we were on an alpha version, I guess alpha->beta is an improvement in stability. 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. The semantic difference between alpha and beta is not super big since we still ship breaking changes. The beta bump was mostly because we finally reached feature parity with v1 after the i18n release, so we are almost there for a stable release |
||
"@mdx-js/react": "^1.6.21", | ||
"@types/js-yaml": "^4.0.0", | ||
"clsx": "^1.1.1", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,55 @@ | ||
module.exports = { | ||
primarySidebar: [{ | ||
type: 'category', | ||
label: 'General', | ||
collapsed: false, | ||
items: [ | ||
'overview', | ||
'installation', | ||
'usage', | ||
'configuration', | ||
'options', | ||
'imports', | ||
'troubleshooting', | ||
'performance', | ||
] | ||
}, { | ||
type: 'category', | ||
label: 'Advanced', | ||
collapsed: false, | ||
items: [ | ||
'how-it-works', | ||
'paths', | ||
'types', | ||
'compilers', | ||
'transpilers', | ||
'module-type-overrides' | ||
], | ||
}, { | ||
type: 'category', | ||
label: 'Recipes', | ||
collapsed: false, | ||
items: [ | ||
'recipes/watching-and-restarting', | ||
'recipes/ava', | ||
'recipes/gulp', | ||
'recipes/intellij', | ||
'recipes/mocha', | ||
'recipes/tape', | ||
'recipes/visual-studio-code', | ||
'recipes/other' | ||
] | ||
}], | ||
hiddenSidebar: [{ | ||
type: 'category', | ||
label: 'Hidden pages', | ||
collapsed: false, | ||
items: [ | ||
'options-table', | ||
] | ||
}], | ||
primarySidebar: [ | ||
{ | ||
type: 'category', | ||
label: 'General', | ||
collapsed: false, | ||
items: [ | ||
'overview', | ||
'installation', | ||
'usage', | ||
'configuration', | ||
'options', | ||
'imports', | ||
'troubleshooting', | ||
'performance', | ||
], | ||
}, | ||
{ | ||
type: 'category', | ||
label: 'Advanced', | ||
collapsed: false, | ||
items: [ | ||
'how-it-works', | ||
'paths', | ||
'types', | ||
'compilers', | ||
'transpilers', | ||
'module-type-overrides', | ||
], | ||
}, | ||
{ | ||
type: 'category', | ||
label: 'Recipes', | ||
collapsed: false, | ||
items: [ | ||
'recipes/watching-and-restarting', | ||
'recipes/ava', | ||
'recipes/gulp', | ||
'recipes/intellij', | ||
'recipes/mocha', | ||
'recipes/tape', | ||
'recipes/visual-studio-code', | ||
'recipes/other', | ||
], | ||
}, | ||
], | ||
hiddenSidebar: [ | ||
{ | ||
type: 'category', | ||
label: 'Hidden pages', | ||
collapsed: false, | ||
items: ['options-table'], | ||
}, | ||
], | ||
}; |
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.js
before.