Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
0bf78f8
chore(docusaurus): JP - update to latest
thetaPC Jul 20, 2023
00f29b5
chore(docusaurus): update node version
thetaPC Jul 20, 2023
9c8ea20
chore(docusaurus): updating styles
thetaPC Aug 1, 2023
62a69a8
Merge branch 'translation/jp' of github.com:ionic-team/ionic-docs int…
thetaPC Aug 1, 2023
a836330
chore(docusaurus): cta label switch
thetaPC Aug 1, 2023
1e3939e
chore(docusaurus): lint
thetaPC Aug 1, 2023
e2cf225
chore(docusaurus): update social link sizes
thetaPC Aug 4, 2023
38283de
chore(docusaurus): remove legacy-peer-deps
thetaPC Aug 8, 2023
bf80116
chore(docusaurus): swizzle LocaleDropdownNavbarItem
thetaPC Aug 10, 2023
f412783
chore(docusaurus): add original source for swizzled
thetaPC Aug 10, 2023
cf3c172
Merge branch 'translation/jp' of github.com:ionic-team/ionic-docs int…
thetaPC Sep 21, 2023
6b22ada
chore(docusaurus): update to latest changes from PR 3014
thetaPC Sep 21, 2023
911421b
chore(docusaurus): update docusaurus
thetaPC Sep 21, 2023
b4343a2
chore(docusaurus): update to latest changes from PR 3014
thetaPC Oct 12, 2023
e9eccdb
Merge branch 'translation/jp' of github.com:ionic-team/ionic-docs int…
thetaPC Oct 27, 2023
d2cede9
chore(docusaurus): smaller search icon
thetaPC Oct 27, 2023
69fbbac
chore(docusaurus): correct path
thetaPC Oct 27, 2023
15c0d85
chore(docusaurus): update cmd symbol on search
thetaPC Oct 28, 2023
1ccd301
Merge branch 'translation/jp' of github.com:ionic-team/ionic-docs int…
thetaPC Oct 30, 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.

141 changes: 66 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: [
[
'@docusaurus/preset-classic',
/** @type {import('@docusaurus/preset-classic').Options} */
{
// Will be passed to @docusaurus/plugin-content-docs (false to disable)
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',
},
},
},
// 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,10 @@ module.exports = {
position: 'left',
},
{
type: 'cta',
position: 'left',
text: 'Ionic採用事例をみよう',
href: `https://ionicframework.jp/case/`,
label: 'Ionic採用事例をみよう',
position: 'left',
className: 'cta',
},
{
type: 'docsVersionDropdown',
Expand Down Expand Up @@ -180,8 +227,9 @@ module.exports = {
className: 'navbar__link--support',
},
{
type: 'separator',
type: 'html',
position: 'right',
value: '<div class="separator" />',
},
{
type: 'localeDropdown',
Expand All @@ -198,34 +246,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 +273,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 +296,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 +321,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