mirror of
https://github.com/LukeHagar/plex-docs.git
synced 2025-12-06 04:20:40 +00:00
initial commit
This commit is contained in:
206
docusaurus.config.js
Normal file
206
docusaurus.config.js
Normal file
@@ -0,0 +1,206 @@
|
||||
// @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: "Plex Docs",
|
||||
tagline: "Plex api documentation with a kick",
|
||||
favicon: "img/favicon.ico",
|
||||
|
||||
// Set the production url of your site here
|
||||
url: "https://your-docusaurus-test-site.com",
|
||||
// Set the /<baseUrl>/ pathname under which your site is served
|
||||
// For GitHub pages deployment, it is often '/<projectName>/'
|
||||
baseUrl: "/",
|
||||
|
||||
// GitHub pages deployment config.
|
||||
// If you aren't using GitHub pages, you don't need these.
|
||||
organizationName: "lukehagar", // Usually your GitHub org/user name.
|
||||
projectName: "plex-docs", // Usually your repo name.
|
||||
|
||||
onBrokenLinks: "throw",
|
||||
onBrokenMarkdownLinks: "warn",
|
||||
|
||||
// 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: {
|
||||
editUrl:
|
||||
"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/",
|
||||
sidebarPath: require.resolve("./sidebars.js"),
|
||||
docLayoutComponent: "@theme/DocPage",
|
||||
docItemComponent: "@theme/ApiItem", // Derived from docusaurus-theme-openapi-docs
|
||||
},
|
||||
blog: {
|
||||
showReadingTime: true,
|
||||
// Please change this to your repo.
|
||||
// Remove this to remove the "edit this page" links.
|
||||
editUrl:
|
||||
"https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/",
|
||||
},
|
||||
theme: {
|
||||
customCss: require.resolve("./src/css/custom.css"),
|
||||
},
|
||||
}),
|
||||
],
|
||||
],
|
||||
|
||||
themeConfig:
|
||||
/** @type {import('@docusaurus/preset-classic').ThemeConfig} */
|
||||
({
|
||||
// Replace with your project's social card
|
||||
image: "img/docusaurus-social-card.jpg",
|
||||
navbar: {
|
||||
title: "Plex Docs",
|
||||
logo: {
|
||||
alt: "My Site Logo",
|
||||
src: "img/logo.svg",
|
||||
},
|
||||
items: [
|
||||
{ to: "/docs/plex", label: "API", className: "indent" },
|
||||
{ to: "/blog", label: "Blog", className: "indent" },
|
||||
],
|
||||
},
|
||||
footer: {
|
||||
style: "dark",
|
||||
links: [
|
||||
{
|
||||
title: "Docs",
|
||||
items: [
|
||||
{
|
||||
label: "OpenAPI Docs",
|
||||
to: "/",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "Community",
|
||||
items: [
|
||||
{
|
||||
label: "Plex",
|
||||
href: "https://plex.tv",
|
||||
},
|
||||
{
|
||||
label: "Plex Forums",
|
||||
href: "https://forums.plex.tv",
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
title: "More",
|
||||
items: [
|
||||
{
|
||||
label: "Blog",
|
||||
to: "/blog",
|
||||
},
|
||||
{
|
||||
label: "GitHub",
|
||||
href: "https://github.com/facebook/docusaurus",
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
|
||||
},
|
||||
prism: {
|
||||
theme: lightCodeTheme,
|
||||
darkTheme: darkCodeTheme,
|
||||
additionalLanguages: ["ruby", "csharp", "php", "java", "powershell"],
|
||||
},
|
||||
languageTabs: [
|
||||
{
|
||||
highlight: "bash",
|
||||
language: "curl",
|
||||
logoClass: "bash",
|
||||
},
|
||||
{
|
||||
highlight: "python",
|
||||
language: "python",
|
||||
logoClass: "python",
|
||||
variant: "requests",
|
||||
},
|
||||
{
|
||||
highlight: "go",
|
||||
language: "go",
|
||||
logoClass: "go",
|
||||
},
|
||||
{
|
||||
highlight: "javascript",
|
||||
language: "nodejs",
|
||||
logoClass: "nodejs",
|
||||
variant: "axios",
|
||||
},
|
||||
{
|
||||
highlight: "ruby",
|
||||
language: "ruby",
|
||||
logoClass: "ruby",
|
||||
},
|
||||
{
|
||||
highlight: "csharp",
|
||||
language: "csharp",
|
||||
logoClass: "csharp",
|
||||
variant: "httpclient",
|
||||
},
|
||||
{
|
||||
highlight: "php",
|
||||
language: "php",
|
||||
logoClass: "php",
|
||||
},
|
||||
{
|
||||
highlight: "java",
|
||||
language: "java",
|
||||
logoClass: "java",
|
||||
variant: "unirest",
|
||||
},
|
||||
{
|
||||
highlight: "powershell",
|
||||
language: "powershell",
|
||||
logoClass: "powershell",
|
||||
},
|
||||
],
|
||||
announcementBar: {
|
||||
id: "announcementBar_1",
|
||||
content:
|
||||
"If you have any feedback on the <a href='https://github.com/LukeHagar/plex-api-spec'>Website</a> or the <a href='https://github.com/LukeHagar/plex-api-spec'>API Specification</a> please let me know!",
|
||||
},
|
||||
}),
|
||||
|
||||
plugins: [
|
||||
[
|
||||
"docusaurus-plugin-openapi-docs",
|
||||
{
|
||||
id: "openapi",
|
||||
docsPluginId: "classic",
|
||||
config: {
|
||||
Plex: {
|
||||
specPath: "static/plex-api-spec-dereferenced.yaml", // Path to designated spec file
|
||||
outputDir: "docs/plex", // Output directory for generated .mdx docs
|
||||
template: "api.mustache",
|
||||
sidebarOptions: {
|
||||
groupPathsBy: "tag",
|
||||
categoryLinkSource: "tag",
|
||||
sidebarCollapsed: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
|
||||
themes: ["docusaurus-theme-openapi-docs"],
|
||||
};
|
||||
|
||||
module.exports = config;
|
||||
Reference in New Issue
Block a user