Skip to content
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(docusaurus): update to latest #3014

Merged
merged 53 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
9cfc0b6
chore(docusaurus): update to latest
thetaPC Jul 3, 2023
78c3bb0
chore(docusaurus): update paths
thetaPC Jul 3, 2023
806ced2
chore(docusaurus): docusaurus config update
thetaPC Jul 3, 2023
e90ea66
chore(docusaurus): theme components update
thetaPC Jul 3, 2023
da99aa3
chore(docusaurus): themeConfigScheme path update
thetaPC Jul 3, 2023
fb2e419
chore(docusaurus): removal of custsom docusaurus-theme-classic
thetaPC Jul 3, 2023
c969de4
chore(docusaurus): use ionic-ds
thetaPC Jul 3, 2023
5af40a9
chore(docusaurus): useScrollPositionBlocker path update
thetaPC Jul 3, 2023
3b4173d
chore(docusaurus): use colorMode instead of isDarkTheme (deprecated)
thetaPC Jul 3, 2023
1b4b665
chore(docusaurus): social links via css
thetaPC Jul 3, 2023
7f89e7b
chore(docusaurus): navbar cta
thetaPC Jul 3, 2023
163f9f1
chore(docusaurus): sidebar styles
thetaPC Jul 3, 2023
0b3cbdb
chore(docusaurus): social links nav styling
thetaPC Jul 3, 2023
b6381b0
chore(docusaurus): lint
thetaPC Jul 3, 2023
af1ec1f
chore(docusaurus): remove duplicate plugin
thetaPC Jul 3, 2023
487d8a2
chore(docusaurus): uninstall duplicate packages
thetaPC Jul 3, 2023
782a7ae
chore(docusaurus): remove transparent for search page
thetaPC Jul 3, 2023
ae81a73
chore(docusaurus): details on swizzle
thetaPC Jul 4, 2023
e4af97a
chore(docusaurus): update node
thetaPC Jul 20, 2023
8eaf36c
chore(docusaurus): correct type
thetaPC Jul 20, 2023
ad56f82
chore(docusaurus): navbar and sidebar styles
thetaPC Aug 1, 2023
e5d9ac8
chore(docusaurus): remove webkit css
thetaPC Aug 1, 2023
5209546
chore(docusaurus): cta and separator styles
thetaPC Aug 1, 2023
6ba7427
chore(docusaurus): sidebar ul margin top removal
thetaPC Aug 1, 2023
44eb7cc
Merge branch 'main' of github.com:ionic-team/ionic-docs into docusaur…
thetaPC Aug 1, 2023
642aaea
chore(docusaurus): update social link size
thetaPC Aug 4, 2023
26d28bc
chore(docusaurus): remove legacy-peer-deps
thetaPC Aug 8, 2023
eaefb54
chore(docusaurus): swizzled LocaleDropdownNavbarItem
thetaPC Aug 10, 2023
3a3e80c
chore(docusaurus): add original source for swizzled
thetaPC Aug 10, 2023
5e2ab7e
chore(docusaurus): remove console log
thetaPC Aug 10, 2023
07afdfa
chore(docusaurus)L: lint
thetaPC Aug 10, 2023
d1ec4be
docs(sidebar, top-nav): requested changes
thetaPC Sep 1, 2023
28d7b26
chore(docs): requested style changes
thetaPC Sep 1, 2023
91c7b18
chore(doc-item): margin in footer
thetaPC Sep 2, 2023
55bc40a
chore(navbar): remove order css
thetaPC Sep 2, 2023
2e051f5
chore(docusaurus): more requested changes
thetaPC Sep 21, 2023
4ac4192
chore(navbar): add missing close tag
thetaPC Sep 21, 2023
91db9ca
chore(docusaurus): add reasons for swizzle
thetaPC Sep 21, 2023
fb90efd
chore(docusaurus): wrapped instead of eject
thetaPC Sep 21, 2023
a3fe039
chore(localeDropdownNavbarItem): switch to tsx
thetaPC Sep 21, 2023
ac11a79
Merge branch 'main' of github.com:ionic-team/ionic-docs into docusaur…
thetaPC Sep 21, 2023
70dd033
chore(toc): fix edit page link
thetaPC Sep 21, 2023
5c0c6e0
chore(docusaurus): update docusaurus
thetaPC Sep 21, 2023
6473b5d
chore(docusaurus): hide docs demo on certain window size
thetaPC Sep 30, 2023
3b00897
chore(docusaurus): match search command to K size
thetaPC Sep 30, 2023
7f04586
chore(docusaurus): switch to margin-inline-start
thetaPC Sep 30, 2023
bc3f032
Merge branch 'main' of github.com:ionic-team/ionic-docs into docusaur…
thetaPC Oct 12, 2023
0bd636a
chore(docusaurus): update package-lock
thetaPC Oct 12, 2023
f05346a
chore(docusaurus): add missing packages
thetaPC Oct 12, 2023
f74a89b
chore(docusaurus): use the correct path
thetaPC Oct 12, 2023
449c02a
chore(docusaurus): add comments
thetaPC Oct 12, 2023
e059134
chore(docusaurus): smaller search icon
thetaPC Oct 27, 2023
72a0ccf
chore(docusaurus): update cmd symbol on search
thetaPC Oct 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions docusaurus-theme-classic/.gitignore

This file was deleted.

23,149 changes: 0 additions & 23,149 deletions docusaurus-theme-classic/package-lock.json

This file was deleted.

14 changes: 0 additions & 14 deletions docusaurus-theme-classic/package.json

This file was deleted.

54 changes: 0 additions & 54 deletions docusaurus-theme-classic/src/index.js

This file was deleted.

142 changes: 67 additions & 75 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,53 @@ module.exports = {
favicon: 'img/meta/favicon-96x96.png',
organizationName: 'ionic-team',
projectName: 'ionic-docs',
presets: [
liamdebeasi marked this conversation as resolved.
Show resolved Hide resolved
[
'@docusaurus/preset-classic',
liamdebeasi marked this conversation as resolved.
Show resolved Hide resolved
/** @type {import('@docusaurus/preset-classic').Options} */
{
liamdebeasi marked this conversation as resolved.
Show resolved Hide resolved
// Will be passed to @docusaurus/plugin-content-docs (false to disable)
docs: {
liamdebeasi marked this conversation as resolved.
Show resolved Hide resolved
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars.js'),
editUrl: ({ versionDocsDirPath, docPath, locale }) => {
if (locale != 'en') {
return 'https://crowdin.com/project/ionic-docs';
}
if ((match = docPath.match(/api\/(.*)\.md/)) != null) {
return `https://github.com/ionic-team/ionic-docs/tree/main/docs/api/${match[1]}.md`;
}
if ((match = docPath.match(/cli\/commands\/(.*)\.md/)) != null) {
return `https://github.com/ionic-team/ionic-cli/edit/develop/packages/@ionic/cli/src/commands/${match[1].replace(
'-',
'/'
)}.ts`;
}
if ((match = docPath.match(/native\/(.*)\.md/)) != null) {
return `https://github.com/ionic-team/capacitor-plugins/edit/main/${match[1]}/README.md`;
}
return `https://github.com/ionic-team/ionic-docs/edit/main/${versionDocsDirPath}/${docPath}`;
},
exclude: ['README.md'],
lastVersion: 'current',
versions: {
current: {
label: 'v7',
},
},
},
// Will be passed to @docusaurus/theme-classic.
theme: {
customCss: [
require.resolve('./node_modules/modern-normalize/modern-normalize.css'),
require.resolve('./node_modules/@ionic-internal/ionic-ds/dist/tokens/tokens.css'),
require.resolve('./src/styles/custom.scss'),
],
},
},
],
],
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
themeConfig: {
metadata: [
{ name: 'og:image', content: 'https://ionicframework.com/docs/img/meta/open-graph.png' },
Expand Down Expand Up @@ -98,10 +145,11 @@ module.exports = {
position: 'left',
},
{
type: 'cta',
type: 'doc',
docId: 'updating/7-0',
label: 'Ionic v7.0.0 Upgrade Guide',
position: 'left',
text: 'Ionic v7.0.0 Upgrade Guide',
href: `/updating/7-0`,
className: 'cta',
},
{
type: 'docsVersionDropdown',
Expand Down Expand Up @@ -180,8 +228,9 @@ module.exports = {
className: 'navbar__link--support',
},
{
type: 'separator',
type: 'html',
position: 'right',
value: '<div class="separator" />',
},
{
type: 'localeDropdown',
Expand All @@ -198,34 +247,25 @@ module.exports = {
className: 'icon-link language navbar__item',
},
{
type: 'iconLink',
href: 'https://twitter.com/Ionicframework',
position: 'right',
icon: {
alt: 'twitter logo',
src: `/logos/twitter.svg`,
href: 'https://twitter.com/Ionicframework',
target: '_blank',
},
className: 'icon-link icon-link-mask icon-link-twitter',
'aria-label': 'Twitter',
target: '_blank',
},
{
type: 'iconLink',
href: 'https://github.com/ionic-team/ionic-framework',
position: 'right',
icon: {
alt: 'github logo',
src: `/logos/github.svg`,
href: 'https://github.com/ionic-team/ionic-framework',
target: '_blank',
},
className: 'icon-link icon-link-mask icon-link-github',
'aria-label': 'GitHub repository',
target: '_blank',
},
{
type: 'iconLink',
href: 'https://ionic.link/discord',
position: 'right',
icon: {
alt: 'discord logo',
src: `/logos/discord.svg`,
href: 'https://ionic.link/discord',
target: '_blank',
},
className: 'icon-link icon-link-mask icon-link-discord',
'aria-label': 'Discord',
target: '_blank',
},
],
},
Expand All @@ -234,7 +274,7 @@ module.exports = {
},
prism: {
theme: { plain: {}, styles: [] },
// https://github.com/FormidableLabs/prism-react-renderer/blob/master/src/vendor/prism/includeLangs.js
// https://github.com/FormidableLabs/prism-react-renderer/blob/5a1c93592c6475fb230bfcb8a9666b72b331638b/packages/generate-prism-languages/index.ts#L9-L24
additionalLanguages: ['shell-session', 'http'],
},
algolia: {
Expand All @@ -257,41 +297,6 @@ module.exports = {
},
},
],
[
'@docusaurus/plugin-content-docs',
{
routeBasePath: '/',
sidebarPath: require.resolve('./sidebars.js'),
editUrl: ({ versionDocsDirPath, docPath, locale }) => {
if (locale != 'en') {
return 'https://crowdin.com/project/ionic-docs';
}
if ((match = docPath.match(/api\/(.*)\.md/)) != null) {
return `https://github.com/ionic-team/ionic-docs/tree/main/docs/api/${match[1]}.md`;
}
if ((match = docPath.match(/cli\/commands\/(.*)\.md/)) != null) {
return `https://github.com/ionic-team/ionic-cli/edit/develop/packages/@ionic/cli/src/commands/${match[1].replace(
'-',
'/'
)}.ts`;
}
if ((match = docPath.match(/native\/(.*)\.md/)) != null) {
return `https://github.com/ionic-team/capacitor-plugins/edit/main/${match[1]}/README.md`;
}
return `https://github.com/ionic-team/ionic-docs/edit/main/${versionDocsDirPath}/${docPath}`;
},
exclude: ['README.md'],
lastVersion: 'current',
versions: {
current: {
label: 'v7',
},
},
},
],
'@docusaurus/plugin-content-pages',
'@docusaurus/plugin-debug',
'@docusaurus/plugin-sitemap',
'@ionic-internal/docusaurus-plugin-tag-manager',
function (context, options) {
return {
Expand All @@ -317,19 +322,6 @@ module.exports = {
},
],
],
themes: [
[
//overriding the standard docusaurus-theme-classic to provide custom schema
path.resolve(__dirname, 'docusaurus-theme-classic'),
{
customCss: [
require.resolve('./node_modules/modern-normalize/modern-normalize.css'),
require.resolve('./node_modules/@ionic-internal/ionic-ds/dist/tokens/tokens.css'),
require.resolve('./src/styles/custom.scss'),
],
},
],
path.resolve(__dirname, './node_modules/@docusaurus/theme-search-algolia'),
],
customFields: {},
themes: [],
};
Loading