-
Notifications
You must be signed in to change notification settings - Fork 9
/
docusaurus.config.js
156 lines (153 loc) · 4.5 KB
/
docusaurus.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
const path = require('path');
const prismic = require('@prismicio/client');
const fetch = require('node-fetch');
const VERSIONS_JSON = require('./versions.json');
const BASE_URL = '/docs';
module.exports = {
title: 'Samagra Documentation',
tagline:
'tag line',
url: 'https://turbo-vercel-testjjjj.vercel.app/',
baseUrl: `/`,
i18n: {
defaultLocale: 'en',
locales: ['en', 'ja'],
localeConfigs: {
en: { label: 'English' },
ja: { label: '日本語' },
},
},
onBrokenLinks: 'warn',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/meta/favicon-96x96.png',
organizationName: 'ionic-team',
projectName: 'ionic-docs',
themeConfig: {
colorMode: {
defaultMode: 'light',
},
navbar: {
hideOnScroll: true,
logo: {
alt: 'Site Logo',
src: '/logos/SamagraX_light.svg',
srcDark: '/logos/SamagraX_dark.svg',
href: '/',
target: '_self',
width: "140px",
height: "55px"
},
items: [
{
type: 'doc',
docId: 'index',
label: 'Guide',
position: 'left',
},
{
type: 'separator',
position: 'right',
},
{
type: 'iconLink',
position: 'right',
icon: {
alt: 'github logo',
src: `/logos/github.svg`,
href: 'https://github.com/Samagra-Development/docs-template',
target: '_blank',
},
},
],
},
tagManager: {
trackingID: 'GTM-TKMGCBC',
},
prism: {
theme: { plain: {}, styles: [] },
// https://github.com/FormidableLabs/prism-react-renderer/blob/master/src/vendor/prism/includeLangs.js
additionalLanguages: ['shell-session', 'http'],
},
algolia: {
appId: 'O9QSL985BS',
apiKey: 'ceb5366064b8fbf70959827cf9f69227',
indexName: 'ionicframework',
contextualSearch: true,
},
"imageZoom": {
"selector": ".markdown img"
},
},
plugins: [
'docusaurus-plugin-sass',
[
'docusaurus-plugin-module-alias',
{
alias: {
'styled-components': path.resolve(__dirname, './node_modules/styled-components'),
react: path.resolve(__dirname, './node_modules/react'),
'react-dom': path.resolve(__dirname, './node_modules/react-dom'),
'@components': path.resolve(__dirname, './src/components'),
},
},
],
[
'@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/Samagra-Development/samagra-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/Samagra-Development/docs-template/edit/main/${versionDocsDirPath}/${docPath}`;
},
exclude: ['README.md'],
lastVersion: 'current',
versions: {
current: {
label: 'v2',
},
},
},
],
'@docusaurus/plugin-content-pages',
'@docusaurus/plugin-debug',
'@docusaurus/plugin-sitemap',
'@ionic-internal/docusaurus-plugin-tag-manager',
[
path.resolve(__dirname, 'plugins', 'docusaurus-plugin-ionic-component-api'),
{
versions: VERSIONS_JSON,
},
],
"plugin-image-zoom"
],
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: {},
};