mirror of
https://github.com/m1k1o/neko.git
synced 2026-11-03 00:11:48 -06:00
Add example Docker Compose configurations for Neko (#684)
* Add example Docker Compose configurations for Neko - Introduced a simple browser example using Firefox in Docker with optional persistent profile configuration. - Added a TURN server example using Coturn alongside Neko for WebRTC support. - Updated installation documentation to include new examples and improved organization. - Enhanced Docusaurus configuration to support dynamic code imports for example files. - Updated package dependencies to include remark-code-import for better documentation handling. * feat: rename GPU-accelerated browser examples for Intel and Nvidia. * feat: update GPU browser examples and add OAuth configuration example * feat: add Raspberry Pi GPU browser example and update documentation links * feat: update GPU browser examples section for clarity and organization
This commit is contained in:
+185
-177
@@ -1,3 +1,4 @@
|
||||
import path from 'path';
|
||||
import {themes as prismThemes} from 'prism-react-renderer';
|
||||
import type {Config} from '@docusaurus/types';
|
||||
import type * as Preset from '@docusaurus/preset-classic';
|
||||
@@ -6,196 +7,203 @@ import type * as OpenApiPlugin from "docusaurus-plugin-openapi-docs";
|
||||
|
||||
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
|
||||
|
||||
const config: Config = {
|
||||
title: 'n.eko',
|
||||
tagline: 'A self hosted virtual browser that runs in docker and uses WebRTC.',
|
||||
favicon: 'img/favicon.ico',
|
||||
// remark-code-import is ESM-only, so it must be loaded via dynamic import.
|
||||
export default async function createConfig(): Promise<Config> {
|
||||
const {default: codeImport} = await import('remark-code-import');
|
||||
|
||||
// Set the production url of your site here
|
||||
url: 'https://neko.m1k1o.net',
|
||||
// Set the /<baseUrl>/ pathname under which your site is served
|
||||
// For GitHub pages deployment, it is often '/<projectName>/'
|
||||
baseUrl: '/',
|
||||
const config: Config = {
|
||||
title: 'n.eko',
|
||||
tagline: 'A self hosted virtual browser that runs in docker and uses WebRTC.',
|
||||
favicon: 'img/favicon.ico',
|
||||
|
||||
// GitHub pages deployment config.
|
||||
organizationName: 'm1k1o',
|
||||
projectName: 'neko',
|
||||
trailingSlash: false,
|
||||
// Set the production url of your site here
|
||||
url: 'https://neko.m1k1o.net',
|
||||
// Set the /<baseUrl>/ pathname under which your site is served
|
||||
// For GitHub pages deployment, it is often '/<projectName>/'
|
||||
baseUrl: '/',
|
||||
|
||||
onBrokenLinks: 'throw',
|
||||
onBrokenMarkdownLinks: 'warn',
|
||||
// GitHub pages deployment config.
|
||||
organizationName: 'm1k1o',
|
||||
projectName: 'neko',
|
||||
trailingSlash: false,
|
||||
|
||||
i18n: {
|
||||
defaultLocale: 'en',
|
||||
locales: ['en'],
|
||||
},
|
||||
onBrokenLinks: 'throw',
|
||||
onBrokenMarkdownLinks: 'warn',
|
||||
|
||||
presets: [
|
||||
[
|
||||
'classic',
|
||||
{
|
||||
docs: {
|
||||
sidebarPath: './sidebars.ts',
|
||||
docItemComponent: "@theme/ApiItem", // Derived from docusaurus-theme-openapi
|
||||
editUrl: 'https://github.com/m1k1o/neko/tree/main/webpage/',
|
||||
lastVersion: 'current',
|
||||
versions: {
|
||||
current: {
|
||||
label: 'v3',
|
||||
path: 'v3',
|
||||
i18n: {
|
||||
defaultLocale: 'en',
|
||||
locales: ['en'],
|
||||
},
|
||||
|
||||
presets: [
|
||||
[
|
||||
'classic',
|
||||
{
|
||||
docs: {
|
||||
sidebarPath: './sidebars.ts',
|
||||
docItemComponent: "@theme/ApiItem", // Derived from docusaurus-theme-openapi
|
||||
editUrl: 'https://github.com/m1k1o/neko/tree/main/webpage/',
|
||||
lastVersion: 'current',
|
||||
versions: {
|
||||
current: {
|
||||
label: 'v3',
|
||||
path: 'v3',
|
||||
},
|
||||
},
|
||||
// Allows embedding files from the repo-level `examples/` folder into docs via ```yaml file=examples/foo/docker-compose.yaml```
|
||||
remarkPlugins: [[codeImport, {rootDir: path.resolve(__dirname, '..')}]],
|
||||
},
|
||||
},
|
||||
//blog: {
|
||||
// showReadingTime: true,
|
||||
// feedOptions: {
|
||||
// type: ['rss', 'atom'],
|
||||
// xslt: true,
|
||||
// },
|
||||
// editUrl: 'https://github.com/m1k1o/neko/tree/main/docs/',
|
||||
// // Useful options to enforce blogging best practices
|
||||
// onInlineTags: 'warn',
|
||||
// onInlineAuthors: 'warn',
|
||||
// onUntruncatedBlogPosts: 'warn',
|
||||
//},
|
||||
theme: {
|
||||
customCss: './src/css/custom.css',
|
||||
},
|
||||
} satisfies Preset.Options,
|
||||
//blog: {
|
||||
// showReadingTime: true,
|
||||
// feedOptions: {
|
||||
// type: ['rss', 'atom'],
|
||||
// xslt: true,
|
||||
// },
|
||||
// editUrl: 'https://github.com/m1k1o/neko/tree/main/docs/',
|
||||
// // Useful options to enforce blogging best practices
|
||||
// onInlineTags: 'warn',
|
||||
// onInlineAuthors: 'warn',
|
||||
// onUntruncatedBlogPosts: 'warn',
|
||||
//},
|
||||
theme: {
|
||||
customCss: './src/css/custom.css',
|
||||
},
|
||||
} satisfies Preset.Options,
|
||||
],
|
||||
],
|
||||
],
|
||||
|
||||
themeConfig: {
|
||||
image: 'img/neko-social-card.jpg',
|
||||
navbar: {
|
||||
//title: 'n.eko',
|
||||
logo: {
|
||||
alt: 'n.eko',
|
||||
src: 'img/logo.png',
|
||||
themeConfig: {
|
||||
image: 'img/neko-social-card.jpg',
|
||||
navbar: {
|
||||
//title: 'n.eko',
|
||||
logo: {
|
||||
alt: 'n.eko',
|
||||
src: 'img/logo.png',
|
||||
},
|
||||
items: [
|
||||
{
|
||||
type: 'docSidebar',
|
||||
sidebarId: 'docsSidebar',
|
||||
position: 'left',
|
||||
label: 'Docs',
|
||||
},
|
||||
{
|
||||
to: 'contributing',
|
||||
label: 'Contributing',
|
||||
position: 'left',
|
||||
},
|
||||
{
|
||||
to: 'non-goals',
|
||||
label: 'Non-Goals',
|
||||
position: 'left',
|
||||
},
|
||||
{
|
||||
to: 'contact',
|
||||
label: 'Contact',
|
||||
position: 'left',
|
||||
},
|
||||
{
|
||||
href: 'https://github.com/sponsors/m1k1o',
|
||||
label: 'Donate',
|
||||
position: 'left',
|
||||
},
|
||||
{
|
||||
type: 'docsVersionDropdown',
|
||||
position: 'right',
|
||||
},
|
||||
{
|
||||
href: 'https://discord.gg/HXQJmqNJMz',
|
||||
label: 'Discord',
|
||||
position: 'right',
|
||||
},
|
||||
{
|
||||
href: 'https://github.com/m1k1o/neko',
|
||||
label: 'GitHub',
|
||||
position: 'right',
|
||||
},
|
||||
],
|
||||
},
|
||||
items: [
|
||||
footer: {
|
||||
style: 'dark',
|
||||
links: [
|
||||
{
|
||||
title: 'Other Projects',
|
||||
items: [
|
||||
{
|
||||
label: 'Neko Rooms',
|
||||
href: 'https://github.com/m1k1o/neko-rooms',
|
||||
},
|
||||
{
|
||||
label: 'Neko Apps',
|
||||
href: 'https://github.com/m1k1o/neko-apps',
|
||||
},
|
||||
{
|
||||
label: 'Neko VPN',
|
||||
href: 'https://github.com/m1k1o/neko-vpn',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'Community',
|
||||
items: [
|
||||
{
|
||||
label: 'Discord',
|
||||
href: 'https://discord.gg/HXQJmqNJMz',
|
||||
},
|
||||
{
|
||||
label: 'Issues',
|
||||
href: 'https://github.com/m1k1o/neko/issues',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'More',
|
||||
items: [
|
||||
{
|
||||
label: 'GitHub',
|
||||
href: 'https://github.com/m1k1o/neko',
|
||||
},
|
||||
{
|
||||
label: 'Sponsors',
|
||||
href: 'https://github.com/sponsors/m1k1o',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
copyright: `Copyright © ${new Date().getFullYear()} <a href="https://github.com/m1k1o">m1k1o</a>. Built with Docusaurus.`,
|
||||
},
|
||||
prism: {
|
||||
theme: prismThemes.github,
|
||||
darkTheme: prismThemes.dracula,
|
||||
additionalLanguages: ['bash'],
|
||||
},
|
||||
} satisfies Preset.ThemeConfig,
|
||||
|
||||
plugins: [
|
||||
[
|
||||
"docusaurus-plugin-openapi-docs",
|
||||
{
|
||||
type: 'docSidebar',
|
||||
sidebarId: 'docsSidebar',
|
||||
position: 'left',
|
||||
label: 'Docs',
|
||||
},
|
||||
{
|
||||
to: 'contributing',
|
||||
label: 'Contributing',
|
||||
position: 'left',
|
||||
},
|
||||
{
|
||||
to: 'non-goals',
|
||||
label: 'Non-Goals',
|
||||
position: 'left',
|
||||
},
|
||||
{
|
||||
to: 'contact',
|
||||
label: 'Contact',
|
||||
position: 'left',
|
||||
},
|
||||
{
|
||||
href: 'https://github.com/sponsors/m1k1o',
|
||||
label: 'Donate',
|
||||
position: 'left',
|
||||
},
|
||||
{
|
||||
type: 'docsVersionDropdown',
|
||||
position: 'right',
|
||||
},
|
||||
{
|
||||
href: 'https://discord.gg/HXQJmqNJMz',
|
||||
label: 'Discord',
|
||||
position: 'right',
|
||||
},
|
||||
{
|
||||
href: 'https://github.com/m1k1o/neko',
|
||||
label: 'GitHub',
|
||||
position: 'right',
|
||||
id: "openapi",
|
||||
docsPluginId: "classic",
|
||||
config: {
|
||||
api: {
|
||||
specPath: "../server/openapi.yaml",
|
||||
outputDir: "docs/api",
|
||||
downloadUrl: "https://raw.githubusercontent.com/m1k1o/neko/refs/heads/master/server/openapi.yaml",
|
||||
baseUrl: "/docs/v3/api",
|
||||
sidebarOptions: {
|
||||
groupPathsBy: "tag",
|
||||
categoryLinkSource: "tag",
|
||||
sidebarCollapsed: false,
|
||||
},
|
||||
} satisfies OpenApiPlugin.Options,
|
||||
} satisfies Plugin.PluginOptions,
|
||||
},
|
||||
],
|
||||
},
|
||||
footer: {
|
||||
style: 'dark',
|
||||
links: [
|
||||
{
|
||||
title: 'Other Projects',
|
||||
items: [
|
||||
{
|
||||
label: 'Neko Rooms',
|
||||
href: 'https://github.com/m1k1o/neko-rooms',
|
||||
},
|
||||
{
|
||||
label: 'Neko Apps',
|
||||
href: 'https://github.com/m1k1o/neko-apps',
|
||||
},
|
||||
{
|
||||
label: 'Neko VPN',
|
||||
href: 'https://github.com/m1k1o/neko-vpn',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'Community',
|
||||
items: [
|
||||
{
|
||||
label: 'Discord',
|
||||
href: 'https://discord.gg/HXQJmqNJMz',
|
||||
},
|
||||
{
|
||||
label: 'Issues',
|
||||
href: 'https://github.com/m1k1o/neko/issues',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: 'More',
|
||||
items: [
|
||||
{
|
||||
label: 'GitHub',
|
||||
href: 'https://github.com/m1k1o/neko',
|
||||
},
|
||||
{
|
||||
label: 'Sponsors',
|
||||
href: 'https://github.com/sponsors/m1k1o',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
copyright: `Copyright © ${new Date().getFullYear()} <a href="https://github.com/m1k1o">m1k1o</a>. Built with Docusaurus.`,
|
||||
},
|
||||
prism: {
|
||||
theme: prismThemes.github,
|
||||
darkTheme: prismThemes.dracula,
|
||||
additionalLanguages: ['bash'],
|
||||
},
|
||||
} satisfies Preset.ThemeConfig,
|
||||
|
||||
plugins: [
|
||||
[
|
||||
"docusaurus-plugin-openapi-docs",
|
||||
{
|
||||
id: "openapi",
|
||||
docsPluginId: "classic",
|
||||
config: {
|
||||
api: {
|
||||
specPath: "../server/openapi.yaml",
|
||||
outputDir: "docs/api",
|
||||
downloadUrl: "https://raw.githubusercontent.com/m1k1o/neko/refs/heads/master/server/openapi.yaml",
|
||||
baseUrl: "/docs/v3/api",
|
||||
sidebarOptions: {
|
||||
groupPathsBy: "tag",
|
||||
categoryLinkSource: "tag",
|
||||
sidebarCollapsed: false,
|
||||
},
|
||||
} satisfies OpenApiPlugin.Options,
|
||||
} satisfies Plugin.PluginOptions,
|
||||
},
|
||||
],
|
||||
],
|
||||
|
||||
themes: ["docusaurus-theme-openapi-docs"],
|
||||
};
|
||||
themes: ["docusaurus-theme-openapi-docs"],
|
||||
};
|
||||
|
||||
export default config;
|
||||
return config;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user