Skip to content

Commit 0d5b68f

Browse files
committed
Switch to Docusaurus 2
1 parent fc7a731 commit 0d5b68f

File tree

8 files changed

+12553
-7968
lines changed

8 files changed

+12553
-7968
lines changed

.gitignore

+19-12
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
112
.DS_Store
2-
node_modules/
3-
.stencil/
4-
.nova/
5-
dist/
6-
www/
7-
src/pages/**/*.json
8-
src/l10n/pages/**/*.json
9-
src/components/menu/data/
10-
src/components/page/data/
11-
src/components/search/data/
12-
.idea
13-
/.env
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

babel.config.js

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
};

docusaurus.config.js

+58-123
Original file line numberDiff line numberDiff line change
@@ -1,165 +1,100 @@
11
module.exports = {
2-
title: 'Ionic Documentation',
3-
tagline: 'Continuous Mobile DevOps',
4-
url: 'https://ionic.io',
5-
baseUrl: '/docs/',
2+
title: 'My Site',
3+
tagline: 'The tagline of my site',
4+
url: 'https://your-docusaurus-test-site.com',
5+
baseUrl: '/',
66
onBrokenLinks: 'throw',
77
onBrokenMarkdownLinks: 'warn',
8-
favicon: 'img/favicon.png',
9-
organizationName: 'ionic-team',
10-
projectName: 'commercial-docs',
8+
favicon: 'img/favicon.ico',
9+
organizationName: 'facebook', // Usually your GitHub org/user name.
10+
projectName: 'docusaurus', // Usually your repo name.
1111
themeConfig: {
1212
navbar: {
13+
title: 'My Site',
1314
logo: {
14-
alt: 'Ionic Logo',
15-
src: 'img/framework-icon.svg',
15+
alt: 'My Site Logo',
16+
src: 'img/logo.svg',
1617
},
1718
items: [
18-
{
19-
to: '/',
20-
activeBaseRegex: '^/docs/(?!api|components)',
21-
label: 'Guide',
22-
position: 'left',
23-
},
2419
{
25-
to: '/components',
26-
activeBaseRegex: '^/docs/(api|components)',
27-
label: 'Components',
20+
to: 'docs/',
21+
activeBasePath: 'docs',
22+
label: 'Docs',
2823
position: 'left',
2924
},
25+
{to: 'blog', label: 'Blog', position: 'left'},
3026
{
31-
label: 'Platform',
27+
href: 'https://github.com/facebook/docusaurus',
28+
label: 'GitHub',
3229
position: 'right',
30+
},
31+
],
32+
},
33+
footer: {
34+
style: 'dark',
35+
links: [
36+
{
37+
title: 'Docs',
3338
items: [
3439
{
35-
href: 'https://capacitorjs.com/docs',
36-
label: 'Capacitor',
37-
className: 'link--outbound',
40+
label: 'Style Guide',
41+
to: 'docs/',
3842
},
3943
{
40-
href: 'https://ionicframework.com/docs',
41-
label: 'Framework',
42-
className: 'link--outbound',
44+
label: 'Second Doc',
45+
to: 'docs/doc2/',
4346
},
47+
],
48+
},
49+
{
50+
title: 'Community',
51+
items: [
4452
{
45-
to: '/appflow',
46-
label: 'Appflow',
53+
label: 'Stack Overflow',
54+
href: 'https://stackoverflow.com/questions/tagged/docusaurus',
4755
},
4856
{
49-
to: '/identity-vault',
50-
label: 'Identity Vault',
57+
label: 'Discord',
58+
href: 'https://discordapp.com/invite/docusaurus',
5159
},
5260
{
53-
to: '/auth-connect',
54-
label: 'Auth Connect',
61+
label: 'Twitter',
62+
href: 'https://twitter.com/docusaurus',
5563
},
64+
],
65+
},
66+
{
67+
title: 'More',
68+
items: [
5669
{
57-
to: '/offline-storage',
58-
label: 'Offline Storage',
70+
label: 'Blog',
71+
to: 'blog',
5972
},
6073
{
61-
to: '/premier-plugins',
62-
label: 'Premier Plugins',
74+
label: 'GitHub',
75+
href: 'https://github.com/facebook/docusaurus',
6376
},
6477
],
6578
},
66-
// {
67-
// href: 'https://ionicframework.com/docs/cli',
68-
// label: 'CLI',
69-
// className: 'navbar-cli',
70-
// position: 'right',
71-
// },
7279
],
73-
},
74-
gtag: {
75-
trackingID: 'UA-44023830-8',
80+
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
7681
},
7782
},
78-
plugins: [
79-
[
80-
'@docusaurus/plugin-client-redirects',
81-
{
82-
redirects: [
83-
{ from: '/enterprise/auth-connect', to: '/auth-connect' },
84-
{
85-
from: '/enterprise/auth-connect/2.2.X/auth-connect',
86-
to: '/auth-connect/2.2.X/auth-connect',
87-
},
88-
{
89-
from: '/enterprise/auth-connect/3.0.X/auth-connect',
90-
to: '/auth-connect/3.0.X/auth-connect',
91-
},
92-
{ from: '/enterprise/auth-connect/auth0', to: '/auth-connect/auth0' },
93-
{
94-
from: '/enterprise/auth-connect/aws-cognito',
95-
to: '/auth-connect/aws-cognito',
96-
},
97-
{
98-
from: '/enterprise/auth-connect/azure-ad-b2c',
99-
to: '/auth-connect/azure-ad-b2c',
100-
},
101-
{
102-
from: '/enterprise/auth-connect/identityserver4',
103-
to: '/auth-connect/identityserver4',
104-
},
105-
{ from: '/enterprise/auth-connect/okta', to: '/auth-connect/okta' },
106-
{ from: '/enterprise/identity-vault', to: '/identity-vault' },
107-
{
108-
from: '/enterprise/identity-vault/2.0.X/identity-vault',
109-
to: '/identity-vault/2.0.X/identity-vault',
110-
},
111-
{
112-
from: '/enterprise/identity-vault/3.0.X/identity-vault',
113-
to: '/identity-vault/3.0.X/identity-vault',
114-
},
115-
{
116-
from: '/enterprise/identity-vault/3.1.X/identity-vault',
117-
to: '/identity-vault/3.1.X/identity-vault',
118-
},
119-
{
120-
from: '/enterprise/identity-vault/3.2.X/identity-vault',
121-
to: '/identity-vault/3.2.X/identity-vault',
122-
},
123-
{
124-
from: '/enterprise/identity-vault/3.3.X/identity-vault',
125-
to: '/identity-vault/3.3.X/identity-vault',
126-
},
127-
{
128-
from: '/enterprise/identity-vault/3.4.X/identity-vault',
129-
to: '/identity-vault/3.4.X/identity-vault',
130-
},
131-
{
132-
from: '/enterprise/identity-vault/3.5.X/identity-vault',
133-
to: '/identity-vault/3.5.X/identity-vault',
134-
},
135-
{
136-
from: '/enterprise/identity-vault/3.6.X/identity-vault',
137-
to: '/identity-vault/3.6.X/identity-vault',
138-
},
139-
{
140-
from: '/enterprise/identity-vault/4.0.X/identity-vault',
141-
to: '/identity-vault/4.0.X/identity-vault',
142-
},
143-
{
144-
from: '/enterprise/identity-vault/4.1.X/identity-vault',
145-
to: '/identity-vault/4.1.X/identity-vault',
146-
},
147-
{ from: '/enterprise/offline-storage', to: '/offline-storage' },
148-
{
149-
from: '/enterprise/offline-storage/1.0.X/offline-storage',
150-
to: '/offline-storage/1.0.X/offline-storage',
151-
},
152-
],
153-
},
154-
],
155-
],
15683
presets: [
15784
[
15885
'@docusaurus/preset-classic',
15986
{
16087
docs: {
161-
routeBasePath: '/',
16288
sidebarPath: require.resolve('./sidebars.js'),
89+
// Please change this to your repo.
90+
editUrl:
91+
'https://github.com/facebook/docusaurus/edit/master/website/',
92+
},
93+
blog: {
94+
showReadingTime: true,
95+
// Please change this to your repo.
96+
editUrl:
97+
'https://github.com/facebook/docusaurus/edit/master/website/blog/',
16398
},
16499
theme: {
165100
customCss: require.resolve('./src/css/custom.css'),

0 commit comments

Comments
 (0)