xref: /aosp_15_r20/external/jspecify/docs/docusaurus.config.js (revision 2167191df2fa07300797f1ac5b707370b5f38c48)
1/*
2 * Copyright 2022 The JSpecify Authors.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *     http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17// @ts-check
18// Note: type annotations allow type checking and IDEs autocompletion
19
20import {themes as prismThemes} from 'prism-react-renderer';
21
22/** @type {import('@docusaurus/types').Config} */
23const config = {
24  title: 'JSpecify',
25  tagline: 'Standard Annotations for Java Static Analysis',
26  url: 'http://jspecify.org/',
27  baseUrl: '/',
28  onBrokenLinks: 'throw',
29  onBrokenMarkdownLinks: 'throw',
30  favicon: 'img/jspecify-favicon.ico',
31
32  // GitHub pages deployment config.
33  // If you aren't using GitHub pages, you don't need these.
34  organizationName: 'jspecify', // Usually your GitHub org/user name.
35  projectName: 'jspecify', // Usually your repo name.
36
37  // Even if you don't use internalization, you can use this field to set useful
38  // metadata like html lang. For example, if your site is Chinese, you may want
39  // to replace "en" with "zh-Hans".
40  i18n: {
41    defaultLocale: 'en',
42    locales: ['en'],
43  },
44
45  presets: [
46    [
47      'classic',
48      /** @type {import('@docusaurus/preset-classic').Options} */
49      ({
50        docs: {
51          sidebarPath: require.resolve('./sidebars.js'),
52          // Please change this to your repo.
53          // Remove this to remove the "edit this page" links.
54          editUrl:
55            'https://github.com/jspecify/jspecify/tree/main/docs/',
56        },
57        blog: {
58          showReadingTime: true,
59          // Please change this to your repo.
60          // Remove this to remove the "edit this page" links.
61          editUrl:
62            'https://github.com/jspecify/jspecify/tree/main/docs/',
63        },
64        theme: {
65          customCss: require.resolve('./src/css/custom.css'),
66        },
67      }),
68    ],
69  ],
70
71  themeConfig:
72    /** @type {import('@docusaurus/preset-classic').ThemeConfig} */
73    ({
74      navbar: {
75        title: 'JSpecify',
76        logo: {
77          alt: 'JSpecify Logo',
78          src: 'img/jspecify-logo.svg',
79        },
80        items: [
81          {to: '/about', label: 'About Us', position: 'left'},
82          {to: '/docs/start-here', label: 'Start Here', position: 'left'},
83          {
84            href: 'http://jspecify.org/docs/api/org/jspecify/annotations/package-summary.html',
85            label: 'Javadoc',
86            position: 'left',
87          },
88          {to: '/blog', label: 'Blog', position: 'left'},
89          {
90            href: 'https://github.com/jspecify/jspecify',
91            label: 'GitHub',
92            position: 'right',
93          },
94        ],
95      },
96      footer: {
97        style: 'dark',
98        links: [
99          {
100            title: 'Docs',
101            items: [
102              {
103                label: 'Start Here',
104                to: '/docs/start-here',
105              },
106              {
107                label: 'User Guide',
108                to: '/docs/user-guide',
109              },
110              {
111                label: 'Javadoc',
112                href: 'http://jspecify.org/docs/api/org/jspecify/annotations/package-summary.html',
113              },
114              {
115                label: 'Draft Specification',
116                to: '/docs/spec',
117              },
118            ],
119          },
120          {
121            title: 'Contacts',
122            items: [
123              {
124                label: 'Public Group',
125                href: 'https://groups.google.com/g/jspecify-discuss'
126              },
127              {
128                label: 'Mail The Team',
129                href: 'mailto:[email protected]',
130              },
131            ],
132          },
133          {
134            title: 'More',
135            items: [
136              {
137                label: 'GitHub',
138                href: 'https://github.com/jspecify/jspecify',
139              },
140              {
141                label: 'Blog',
142                to: '/blog',
143              },
144            ],
145          },
146        ],
147        copyright: `Copyright ${new Date().getFullYear()} The JSpecify Authors. Built with Docusaurus.`,
148      },
149      prism: {
150        theme: prismThemes.github,
151        darkTheme: prismThemes.dracula,
152        additionalLanguages: ['java'],
153      },
154    }),
155};
156
157export default config;
158