2024-01-25 22:38:57 -08:00
import { themes as prismThemes } from 'prism-react-renderer' ;
import type { Config } from '@docusaurus/types' ;
2023-11-07 19:40:55 -06:00
import type * as Preset from '@docusaurus/preset-classic' ;
2024-03-24 22:55:16 -07:00
import { docOgRenderer , blogOgRenderer , pageOgRenderer } from './src/renderer/ImageRenderers' ;
2023-11-07 19:40:55 -06:00
const config : Config = {
2024-01-29 00:04:58 -08:00
title : 'GeyserMC' ,
2024-02-25 00:53:46 -08:00
tagline : 'Revolutionize Your Minecraft Server' ,
2024-01-25 22:38:57 -08:00
favicon : 'img/favicon.ico' ,
2023-11-07 19:40:55 -06:00
2024-03-03 12:40:19 -08:00
// TODO: Change to correct domain in production!
2024-03-10 22:04:11 -07:00
url : 'https://dev.geysermc.org' ,
2024-01-25 22:38:57 -08:00
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl : '/' ,
2023-11-07 19:40:55 -06:00
2024-01-25 22:38:57 -08:00
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName : 'GeyserMC' , // Usually your GitHub org/user name.
2024-03-24 23:30:02 -07:00
projectName : 'GeyserWebsite' , // Usually your repo name.
2023-11-07 19:40:55 -06:00
2024-01-25 22:38:57 -08:00
onBrokenLinks : 'throw' ,
onBrokenMarkdownLinks : 'warn' ,
2023-11-07 19:40:55 -06:00
2024-01-25 22:38:57 -08:00
// Even if you don't use internationalization, 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' ,
2024-03-03 14:46:48 -08:00
locales : [ 'en' , 'de' ],
2024-01-25 22:38:57 -08:00
},
2023-11-07 19:40:55 -06:00
2024-01-25 22:38:57 -08:00
presets : [
[
'classic' ,
{
docs : {
2024-03-12 15:38:42 +00:00
sidebarPath : require.resolve ( "./sidebars.ts" ),
2024-01-25 22:38:57 -08:00
editUrl :
2024-03-25 11:29:12 +00:00
'https://github.com/GeyserMC/GeyserWebsite/tree/master/' ,
2023-11-07 19:55:30 -06:00
2024-01-25 22:38:57 -08:00
routeBasePath : '/' , // Serve the docs at the site's root
2024-03-12 00:35:02 -07:00
docItemComponent : "@theme/ApiItem" ,
2024-01-25 22:38:57 -08:00
},
2024-03-11 23:00:24 -07:00
blog : {},
2024-01-25 22:38:57 -08:00
theme : {
customCss : './src/css/custom.css' ,
},
} satisfies Preset . Options ,
],
2023-11-07 19:40:55 -06:00
],
2024-03-12 00:35:02 -07:00
plugins : [
[
'docusaurus-plugin-openapi-docs' ,
{
id : "api" ,
docsPluginId : "classic" ,
config : {
2024-03-12 15:38:42 +00:00
'downloads.geysermc.org' : {
2024-03-12 00:39:54 -07:00
specPath : "openapi/downloads.json" ,
2024-03-12 15:38:42 +00:00
outputDir : "docs/api/downloads.geysermc.org" ,
sidebarOptions : {
groupPathsBy : "tag" ,
},
2024-03-12 00:35:02 -07:00
},
2024-03-12 15:38:42 +00:00
'api.geysermc.org' : {
2024-03-12 00:39:54 -07:00
specPath : "openapi/global.json" ,
2024-03-12 15:38:42 +00:00
outputDir : "docs/api/api.geysermc.org" ,
sidebarOptions : {
groupPathsBy : "tag" ,
},
2024-03-12 00:35:02 -07:00
}
}
},
2024-03-24 22:55:16 -07:00
],
[
'@kas-tle/docusaurus-og' ,
{
path : './preview-images' ,
imageRenderers : {
'docusaurus-plugin-content-docs' : docOgRenderer ,
'docusaurus-plugin-content-pages' : pageOgRenderer ,
'docusaurus-plugin-content-blog' : blogOgRenderer ,
},
},
2024-03-12 00:35:02 -07:00
]
],
themes : [ "docusaurus-theme-openapi-docs" ],
2024-01-25 22:38:57 -08:00
themeConfig : {
2024-03-03 12:07:43 -08:00
image : 'img/site/geyser.png' ,
2024-01-25 22:38:57 -08:00
navbar : {
2024-01-29 00:04:58 -08:00
title : 'GeyserMC' ,
2024-01-25 22:38:57 -08:00
logo : {
alt : 'GeyserMC logo' ,
src : 'img/apple-touch-icon.png' ,
2023-11-07 19:40:55 -06:00
},
2024-01-25 22:38:57 -08:00
items : [
{
2024-01-29 00:04:58 -08:00
type : 'dropdown' ,
label : 'Wiki' ,
2024-03-02 23:32:57 -08:00
className : 'header-wiki-link' ,
2024-03-11 23:00:24 -07:00
position : 'left' ,
2024-01-29 00:04:58 -08:00
to : 'geyser/setup' ,
items : [
{
type : 'doc' ,
docId : 'geyser/setup' ,
label : 'Geyser' ,
},
{
type : 'doc' ,
docId : 'floodgate/setup' ,
label : 'Floodgate' ,
},
2024-03-12 00:35:02 -07:00
{
type : 'doc' ,
2024-03-12 15:38:42 +00:00
docId : 'api/api.geysermc.org/global-api' ,
2024-03-12 00:35:02 -07:00
label : 'REST APIs' ,
},
2024-01-29 00:04:58 -08:00
{
type : 'doc' ,
docId : 'other/geyseroptionalpack' ,
label : 'Other' ,
},
]
2024-01-25 22:38:57 -08:00
},
2024-03-11 23:00:24 -07:00
{
2024-03-12 00:35:02 -07:00
to : 'blog' ,
label : 'Blog' ,
2024-03-11 23:00:24 -07:00
position : 'left' ,
className : 'header-blog-link'
},
2024-01-25 22:38:57 -08:00
{
2024-01-29 00:04:58 -08:00
to : 'download' ,
2024-03-02 23:32:57 -08:00
label : 'Download' ,
2024-03-11 23:00:24 -07:00
position : 'left' ,
2024-01-29 00:04:58 -08:00
className : 'header-download-link'
2024-01-25 22:38:57 -08:00
},
{
2024-01-29 00:04:58 -08:00
href : 'https://github.com/GeyserMC/Geyser' ,
position : 'right' ,
className : 'header-github-link'
2024-01-25 22:38:57 -08:00
},
{
2024-01-29 00:04:58 -08:00
href : 'https://discord.gg/geysermc' ,
2024-01-25 22:38:57 -08:00
position : 'right' ,
2024-01-29 00:04:58 -08:00
className : 'header-discord-link'
2024-01-25 22:38:57 -08:00
},
2024-03-03 14:46:48 -08:00
{
type : 'localeDropdown' ,
position : 'right' ,
},
2024-01-25 22:38:57 -08:00
],
2023-11-07 19:40:55 -06:00
},
2024-01-25 22:38:57 -08:00
footer : {
style : 'dark' ,
2024-03-02 23:32:57 -08:00
copyright : `© ${ new Date (). getFullYear () } GeyserMC | Built with Docusaurus` ,
2023-11-07 19:40:55 -06:00
},
2024-01-25 22:38:57 -08:00
prism : {
theme : prismThemes.github ,
darkTheme : prismThemes.dracula ,
2024-03-25 11:29:12 +00:00
additionalLanguages : [
'bash' , 'batch' , 'java' , 'json' , // Docs
'php' , 'powershell' , 'csharp' , 'ruby' // API examples
],
2024-01-25 22:38:57 -08:00
},
2024-01-27 23:08:56 -08:00
colorMode : {
defaultMode : 'dark' ,
disableSwitch : false ,
2024-01-28 15:40:31 -08:00
respectPrefersColorScheme : false ,
2024-01-27 23:08:56 -08:00
},
2024-03-02 23:32:57 -08:00
docs : {
sidebar : {
hideable : true ,
}
},
2024-03-11 15:54:38 +00:00
algolia : {
appId : '0DTHI9QFCH' ,
2024-03-12 00:35:02 -07:00
apiKey : '3cc0567f76d2ed3ffdb4cc94f0ac9815' ,
2024-03-11 15:54:38 +00:00
indexName : 'geysermc' ,
contextualSearch : true ,
searchPagePath : 'search' ,
},
2024-03-11 18:16:02 +00:00
// Remove in production
announcementBar : {
id : 'support_us' ,
2024-03-25 11:00:24 +00:00
content : '<b>This is the in-development version of the site and may not be fully updated. Vist the <a target="_blank" rel="noopener noreferrer" href="https://geysermc.org/">main site</a> or <a target="_blank" rel="noopener noreferrer" href="https://wiki.geysermc.org/">current wiki</a> for the most updated info.</b>' ,
2024-03-11 18:16:02 +00:00
backgroundColor : '#ff333d' ,
textColor : '#e3e3e3' ,
isCloseable : true ,
},
2024-03-24 23:30:02 -07:00
metadata : [
{ name : 'theme-color' , content : '#25c2a0' },
],
2024-01-25 22:38:57 -08:00
} satisfies Preset . ThemeConfig ,
2023-11-07 19:40:55 -06:00
};
export default config ;