forked from sheetjs/docs.sheetjs.com
248 lines
9.3 KiB
JavaScript
248 lines
9.3 KiB
JavaScript
// @ts-check
|
|
// Note: type annotations allow type checking and IDEs autocompletion
|
|
|
|
const lightCodeTheme = require('prism-react-renderer/themes/github');
|
|
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
|
|
|
|
/** @type {import('@docusaurus/types').Config} */
|
|
const config = {
|
|
title: 'SheetJS Community Edition',
|
|
tagline: 'Get Sheet Done',
|
|
url: 'https://docs.sheetjs.com',
|
|
baseUrl: '/',
|
|
onBrokenLinks: 'throw',
|
|
onBrokenMarkdownLinks: 'warn',
|
|
favicon: 'img/favicon.ico',
|
|
|
|
// GitHub pages deployment config.
|
|
// If you aren't using GitHub pages, you don't need these.
|
|
//organizationName: 'sheetjs', // Usually your GitHub org/user name.
|
|
//projectName: 'sheetjs', // Usually your repo name.
|
|
|
|
// Even if you don't use internalization, you can use this field to set useful
|
|
// metadata like html lang. For example, if your site is Chinese, you may want
|
|
// to replace "en" with "zh-Hans".
|
|
i18n: {
|
|
defaultLocale: 'en',
|
|
locales: ['en'],
|
|
},
|
|
|
|
presets: [
|
|
[
|
|
'classic',
|
|
/** @type {import('@docusaurus/preset-classic').Options} */
|
|
({
|
|
docs: {
|
|
sidebarPath: require.resolve('./sidebars.js'),
|
|
showLastUpdateTime: true,
|
|
editUrl: 'https://git.sheetjs.com/sheetjs/docs.sheetjs.com/src/branch/master/docz',
|
|
},
|
|
//blog: {
|
|
// showReadingTime: true,
|
|
// Please change this to your repo.
|
|
// Remove this to remove the "edit this page" links.
|
|
// editUrl: 'https://git.sheetjs.com/sheetjs/docs.sheetjs.com/src/branch/master/docz/',
|
|
//},
|
|
theme: {
|
|
customCss: require.resolve('./src/css/custom.css'),
|
|
},
|
|
googleAnalytics: {
|
|
trackingID: 'UA-36810333-1',
|
|
anonymizeIP: true
|
|
},
|
|
gtag: {
|
|
trackingID: 'G-0TSXVXRHM6',
|
|
anonymizeIP: true
|
|
}
|
|
}),
|
|
],
|
|
],
|
|
|
|
themeConfig:
|
|
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
|
({
|
|
mermaid: {
|
|
options: {
|
|
themeVariables: {
|
|
edgeLabelBackground: ""
|
|
}
|
|
}
|
|
},
|
|
navbar: {
|
|
title: 'SheetJS CE Docs',
|
|
logo: {
|
|
alt: 'SheetJS Logo',
|
|
src: 'img/logo.svg',
|
|
},
|
|
items: [
|
|
{
|
|
type: 'doc',
|
|
docId: 'index',
|
|
position: 'left',
|
|
label: 'Docs',
|
|
},
|
|
//{to: '/blog', label: 'Blog', position: 'left'},
|
|
{
|
|
href: 'https://sheetjs.com',
|
|
label: 'SheetJS',
|
|
position: 'right',
|
|
},
|
|
{
|
|
href: 'https://git.sheetjs.com/sheetjs/sheetjs/issues',
|
|
label: 'Source',
|
|
position: 'right',
|
|
},
|
|
],
|
|
},
|
|
footer: {
|
|
style: 'dark',
|
|
links: [
|
|
{
|
|
title: 'Docs',
|
|
items: [
|
|
{
|
|
label: 'Intro',
|
|
to: '/docs',
|
|
},
|
|
{
|
|
label: 'Examples',
|
|
to: '/docs/getting-started/examples',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
title: 'Community',
|
|
items: [
|
|
//{
|
|
// label: 'Stack Overflow',
|
|
// href: 'https://stackoverflow.com/questions/tagged/sheetjs',
|
|
//},
|
|
{
|
|
label: 'Discord',
|
|
href: 'https://discord.gg/sheetjs',
|
|
},
|
|
{
|
|
label: 'Twitter',
|
|
href: 'https://twitter.com/sheetjs',
|
|
},
|
|
],
|
|
},
|
|
{
|
|
title: 'More',
|
|
items: [
|
|
//{
|
|
// label: 'Blog',
|
|
// to: '/blog',
|
|
//},
|
|
{
|
|
label: 'SheetJS Pro',
|
|
href: 'https://sheetjs.com/pro',
|
|
},
|
|
{
|
|
label: 'Source',
|
|
href: 'https://git.sheetjs.com/sheetjs/sheetjs',
|
|
},
|
|
],
|
|
},
|
|
],
|
|
copyright: `Copyright © ${new Date().getFullYear()} SheetJS LLC.`,
|
|
},
|
|
prism: {
|
|
theme: lightCodeTheme,
|
|
darkTheme: darkCodeTheme,
|
|
additionalLanguages: [ "visual-basic", "swift", "java", "csharp", "perl", "ruby", "cpp", "applescript", "liquid", "rust", "dart" ],
|
|
},
|
|
liveCodeBlock: {
|
|
playgroundPosition: 'top'
|
|
}
|
|
}),
|
|
themes: [
|
|
"@docusaurus/theme-live-codeblock",
|
|
"@docusaurus/theme-mermaid"
|
|
],
|
|
markdown: {
|
|
mermaid: true
|
|
},
|
|
scripts: [
|
|
{
|
|
src: "https://cdn.sheetjs.com/xlsx-latest/package/dist/xlsx.full.min.js",
|
|
async: true
|
|
}
|
|
],
|
|
plugins: [
|
|
require.resolve("@cmfcmf/docusaurus-search-local"),
|
|
[ '@docusaurus/plugin-client-redirects', {
|
|
redirects: [
|
|
{ from: '/docs/example', to: '/docs/getting-started/examples/export/' },
|
|
{ from: '/docs/getting-started/example', to: '/docs/getting-started/examples/export/' },
|
|
{ from: '/docs/installation', to: '/docs/getting-started/' },
|
|
{ from: '/docs/interface', to: '/docs/api/' },
|
|
{ from: '/docs/demos/excel', to: '/docs/demos/' },
|
|
{ from: '/docs/getting-started/demos/', to: '/docs/demos/' },
|
|
{ from: '/docs/getting-started/demos/excel', to: '/docs/demos/' },
|
|
{ from: '/docs/demos/content', to: '/docs/demos/static/' },
|
|
{ from: '/docs/demos/git', to: '/docs/demos/cloud/github/' },
|
|
{ from: '/docs/demo/grid', to: '/docs/demos/grid/' },
|
|
/* frontend */
|
|
{ from: '/docs/demos/angular', to: '/docs/demos/frontend/angular/' },
|
|
{ from: '/docs/demos/react', to: '/docs/demos/frontend/react/' },
|
|
{ from: '/docs/demos/svelte', to: '/docs/demos/frontend/svelte/' },
|
|
{ from: '/docs/demos/vue', to: '/docs/demos/frontend/vue/' },
|
|
{ from: '/docs/demos/bundler', to: '/docs/demos/frontend/bundler/' },
|
|
{ from: '/docs/demos/legacy', to: '/docs/demos/frontend/legacy/' },
|
|
/* cloud */
|
|
{ from: '/docs/demos/salesforce', to: '/docs/demos/cloud/salesforce/' },
|
|
{ from: '/docs/demos/aws', to: '/docs/demos/cloud/aws/' },
|
|
{ from: '/docs/demos/azure', to: '/docs/demos/cloud/azure/' },
|
|
{ from: '/docs/demos/netsuite', to: '/docs/demos/cloud/netsuite/' },
|
|
{ from: '/docs/demos/gsheet', to: '/docs/demos/cloud/gsheet/' },
|
|
{ from: '/docs/demos/airtable', to: '/docs/demos/cloud/airtable/' },
|
|
/* extensions */
|
|
{ from: '/docs/demos/extendscript', to: '/docs/demos/extensions/extendscript/' },
|
|
{ from: '/docs/demos/excelapi', to: '/docs/demos/extensions/excelapi/' },
|
|
{ from: '/docs/demos/chromium', to: '/docs/demos/extensions/chromium/' },
|
|
{ from: '/docs/getting-started/demos/chromium', to: '/docs/demos/extensions/chromium/' },
|
|
/* cloud */
|
|
{ from: '/docs/demos/cloudata', to: '/docs/demos/cloud/' },
|
|
{ from: '/docs/demos/cloudata/gsheet', to: '/docs/demos/cloud/gsheet/' },
|
|
{ from: '/docs/demos/cloudata/airtable', to: '/docs/demos/cloud/airtable/' },
|
|
{ from: '/docs/getting-started/demos/netsuite', to: '/docs/demos/cloud/netsuite/' },
|
|
/* hosting */
|
|
{ from: '/docs/demos/hosting/dropbox', to: '/docs/demos/cloud/dropbox/' },
|
|
{ from: '/docs/demos/hosting/github', to: '/docs/demos/cloud/github/' },
|
|
/* data */
|
|
{ from: '/docs/demos/database', to: '/docs/demos/data/' },
|
|
{ from: '/docs/demos/nosql', to: '/docs/demos/data/' },
|
|
{ from: '/docs/getting-started/demos/nosql', to: '/docs/demos/data/' },
|
|
/* net */
|
|
{ from: '/docs/demos/headless', to: '/docs/demos/net/headless/' },
|
|
{ from: '/docs/demos/server', to: '/docs/demos/net/server/' },
|
|
{ from: '/docs/demos/network', to: '/docs/demos/net/network/' },
|
|
{ from: '/docs/getting-started/demos/network', to: '/docs/demos/net/network/' },
|
|
/* local */
|
|
{ from: '/docs/demos/clipboard', to: '/docs/demos/local/clipboard/' },
|
|
{ from: '/docs/demos/localfile', to: '/docs/demos/local/file/' },
|
|
{ from: '/docs/demos/data/indexeddb', to: '/docs/demos/local/indexeddb/' },
|
|
/* desktop */
|
|
{ from: '/docs/demos/cli', to: '/docs/demos/desktop/cli/' },
|
|
{ from: '/docs/getting-started/demos/cli', to: '/docs/demos/desktop/cli/' },
|
|
{ from: '/docs/getting-started/demos/desktop', to: '/docs/demos/desktop/' },
|
|
/* bigdata */
|
|
{ from: '/docs/demos/ml', to: '/docs/demos/bigdata/ml/' },
|
|
{ from: '/docs/demos/worker', to: '/docs/demos/bigdata/worker/' },
|
|
{ from: '/docs/demos/stream', to: '/docs/demos/bigdata/stream/' },
|
|
/* installation */
|
|
{ from: '/docs/installation/standalone', to: '/docs/getting-started/installation/standalone/' },
|
|
{ from: '/docs/installation/frameworks', to: '/docs/getting-started/installation/frameworks/' },
|
|
{ from: '/docs/installation/nodejs', to: '/docs/getting-started/installation/nodejs/' },
|
|
{ from: '/docs/installation/amd', to: '/docs/getting-started/installation/amd/' },
|
|
{ from: '/docs/installation/extendscript', to: '/docs/getting-started/installation/extendscript/' },
|
|
{ from: '/docs/installation/deno', to: '/docs/getting-started/installation/deno/' },
|
|
{ from: '/docs/installation/bun', to: '/docs/getting-started/installation/bun/' },
|
|
]
|
|
}]
|
|
]
|
|
};
|
|
|
|
module.exports = config;
|