Files

176 lines
5.9 KiB
TypeScript
Raw Permalink Normal View History

2024-09-12 15:55:36 -07:00
import type { Config } from "@docusaurus/types";
2024-10-08 17:33:43 -04:00
import { docOgRenderer } from "./src/renderer/image-renderers";
2024-09-12 15:49:40 -07:00
2024-10-03 20:28:13 -07:00
const baseUrl = process.env.EMBEDDED ? "/docsite/" : "/";
2024-09-12 15:49:40 -07:00
const config: Config = {
2024-09-12 17:12:02 -07:00
title: "Wave Terminal Documentation",
2024-09-19 13:10:42 -07:00
tagline: "Level Up Your Terminal With Graphical Widgets",
2024-09-12 17:12:02 -07:00
favicon: "img/logo/wave-logo_appicon.svg",
2024-09-12 15:49:40 -07:00
2024-09-12 17:12:02 -07:00
// Set the production url of your site here
url: "https://docs.waveterm.dev/",
2024-09-12 17:12:02 -07:00
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
2024-10-03 20:28:13 -07:00
baseUrl,
2024-09-12 15:49:40 -07:00
2024-09-12 17:12:02 -07:00
// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: "wavetermdev", // Usually your GitHub org/user name.
2024-10-07 12:24:47 -04:00
projectName: "waveterm-docs", // Usually your repo name.
2024-09-12 17:12:02 -07:00
deploymentBranch: "main",
2024-09-12 15:49:40 -07:00
2024-09-12 17:12:02 -07:00
onBrokenLinks: "throw",
onBrokenMarkdownLinks: "warn",
trailingSlash: false,
2024-09-12 15:49:40 -07:00
2024-09-12 17:12:02 -07: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",
locales: ["en"],
},
plugins: [
[
"content-docs",
{
path: "docs",
routeBasePath: "/",
2024-10-08 15:51:20 -07:00
exclude: ["features/**"],
editUrl: !process.env.EMBEDDED ? "https://github.com/wavetermdev/waveterm-docs/edit/main/" : undefined,
2024-09-12 17:12:02 -07:00
} as import("@docusaurus/plugin-content-docs").Options,
],
2024-09-12 17:38:37 -07:00
"ideal-image",
2024-09-26 11:09:42 -07:00
[
"@docusaurus/plugin-sitemap",
{
changefreq: "daily",
filename: "sitemap.xml",
},
],
2024-10-08 17:33:43 -04:00
!process.env.EMBEDDED && [
"@waveterm/docusaurus-og",
{
path: "./preview-images", // relative to the build directory
imageRenderers: {
"docusaurus-plugin-content-docs": docOgRenderer,
},
},
],
].filter((v) => v),
themes: [
["classic", { customCss: "src/css/custom.css" }],
2024-10-04 09:55:28 -07:00
!process.env.EMBEDDED && "@docusaurus/theme-search-algolia",
].filter((v) => v),
2024-09-12 17:12:02 -07:00
themeConfig: {
docs: {
sidebar: {
hideable: false,
autoCollapseCategories: false,
},
2024-09-12 15:49:40 -07:00
},
2024-09-12 17:12:02 -07:00
colorMode: {
defaultMode: "light",
disableSwitch: false,
respectPrefersColorScheme: true,
2024-09-12 15:49:40 -07:00
},
2024-09-12 17:12:02 -07:00
navbar: {
logo: {
2024-09-17 01:10:28 -07:00
src: "img/logo/wave-light.png",
srcDark: "img/logo/wave-dark.png",
2024-09-23 14:55:19 -07:00
href: "https://www.waveterm.dev/",
2024-09-12 17:12:02 -07:00
},
hideOnScroll: true,
items: [
2024-09-12 17:38:37 -07:00
{
type: "doc",
position: "left",
docId: "index",
label: "Docs",
},
2024-10-03 20:28:13 -07:00
!process.env.EMBEDDED
? [
{
href: "https://discord.gg/zUeP2aAjaP",
position: "right",
className: "header-link-custom custom-icon-discord",
"aria-label": "Discord invite",
},
{
href: "https://github.com/wavetermdev/waveterm",
position: "right",
className: "header-link-custom custom-icon-github",
"aria-label": "GitHub repository",
},
]
: [],
].flat(),
2024-09-12 17:12:02 -07:00
},
metadata: [
{
name: "keywords",
content:
"terminal, developer, development, command, line, wave, linux, macos, windows, connection, ssh, cli, waveterm, documentation, docs, ai, graphical, widgets, remote, open, source, open-source, go, golang, react, typescript, javascript",
},
2024-09-26 11:27:13 -07:00
{
name: "og:type",
content: "website",
},
{
name: "og:site_name",
content: "Wave Terminal Documentation",
},
{
name: "application-name",
content: "Wave Terminal Documentation",
},
{
name: "apple-mobile-web-app-title",
content: "Wave Terminal Documentation",
},
],
2024-09-12 17:12:02 -07:00
footer: {
copyright: `Copyright © ${new Date().getFullYear()} Command Line Inc. Built with Docusaurus.`,
2024-09-12 15:49:40 -07:00
},
2024-09-30 22:27:29 -07:00
algolia: {
appId: "B6A8512SN4",
apiKey: "e879cd8663f109b2822cd004d9cd468c",
indexName: "waveterm",
},
2024-09-12 15:55:36 -07:00
},
2024-09-26 11:18:05 -07:00
headTags: [
{
tagName: "link",
attributes: {
rel: "preload",
as: "font",
type: "font/woff2",
"data-next-font": "size-adjust",
2024-10-03 20:28:13 -07:00
href: `${baseUrl}fontawesome/webfonts/fa-sharp-regular-400.woff2`,
2024-09-26 11:18:05 -07:00
},
},
2024-09-26 11:21:29 -07:00
{
tagName: "link",
attributes: {
rel: "sitemap",
type: "application/xml",
title: "Sitemap",
2024-10-03 20:28:13 -07:00
href: `${baseUrl}sitemap.xml`,
2024-09-26 11:21:29 -07:00
},
},
2024-10-04 09:55:28 -07:00
!process.env.EMBEDDED && {
tagName: "script",
attributes: {
defer: "true",
2024-10-04 13:02:36 -07:00
"data-domain": "docs.waveterm.dev",
2024-10-04 09:55:28 -07:00
src: "https://plausible.io/js/script.file-downloads.outbound-links.tagged-events.js",
},
},
].filter((v) => v),
2024-10-03 20:28:13 -07:00
stylesheets: [`${baseUrl}fontawesome/css/fontawesome.min.css`, `${baseUrl}fontawesome/css/sharp-regular.min.css`],
2024-09-12 17:12:02 -07:00
staticDirectories: ["static"],
2024-09-12 15:49:40 -07:00
};
export default config;