Skip to content

Commit

Permalink
update docs backend
Browse files Browse the repository at this point in the history
fixes issue with OpenGraph tags
  • Loading branch information
thatmattlove committed May 29, 2024
1 parent ce1b720 commit 556dccf
Show file tree
Hide file tree
Showing 32 changed files with 2,709 additions and 1,962 deletions.
150 changes: 75 additions & 75 deletions docs/favicon-formats.ts
Original file line number Diff line number Diff line change
@@ -1,80 +1,80 @@
interface Favicon {
rel: string | null;
dimensions: [number, number];
image_format: string;
prefix: string;
rel: string | null;
dimensions: [number, number];
image_format: string;
prefix: string;
}

export default [
{ dimensions: [64, 64], image_format: 'ico', prefix: 'favicon', rel: null },
{ dimensions: [16, 16], image_format: 'png', prefix: 'favicon', rel: 'icon' },
{ dimensions: [32, 32], image_format: 'png', prefix: 'favicon', rel: 'icon' },
{ dimensions: [64, 64], image_format: 'png', prefix: 'favicon', rel: 'icon' },
{ dimensions: [96, 96], image_format: 'png', prefix: 'favicon', rel: 'icon' },
{ dimensions: [180, 180], image_format: 'png', prefix: 'favicon', rel: 'icon' },
{
dimensions: [57, 57],
image_format: 'png',
prefix: 'apple-touch-icon',
rel: 'apple-touch-icon',
},
{
dimensions: [60, 60],
image_format: 'png',
prefix: 'apple-touch-icon',
rel: 'apple-touch-icon',
},
{
dimensions: [72, 72],
image_format: 'png',
prefix: 'apple-touch-icon',
rel: 'apple-touch-icon',
},
{
dimensions: [76, 76],
image_format: 'png',
prefix: 'apple-touch-icon',
rel: 'apple-touch-icon',
},
{
dimensions: [114, 114],
image_format: 'png',
prefix: 'apple-touch-icon',
rel: 'apple-touch-icon',
},
{
dimensions: [120, 120],
image_format: 'png',
prefix: 'apple-touch-icon',
rel: 'apple-touch-icon',
},
{
dimensions: [144, 144],
image_format: 'png',
prefix: 'apple-touch-icon',
rel: 'apple-touch-icon',
},
{
dimensions: [152, 152],
image_format: 'png',
prefix: 'apple-touch-icon',
rel: 'apple-touch-icon',
},
{
dimensions: [167, 167],
image_format: 'png',
prefix: 'apple-touch-icon',
rel: 'apple-touch-icon',
},
{
dimensions: [180, 180],
image_format: 'png',
prefix: 'apple-touch-icon',
rel: 'apple-touch-icon',
},
{ dimensions: [70, 70], image_format: 'png', prefix: 'mstile', rel: null },
{ dimensions: [270, 270], image_format: 'png', prefix: 'mstile', rel: null },
{ dimensions: [310, 310], image_format: 'png', prefix: 'mstile', rel: null },
{ dimensions: [310, 150], image_format: 'png', prefix: 'mstile', rel: null },
{ dimensions: [196, 196], image_format: 'png', prefix: 'favicon', rel: 'shortcut icon' },
{ dimensions: [48, 48], image_format: "ico", prefix: "favicon", rel: null },
{ dimensions: [16, 16], image_format: "png", prefix: "favicon", rel: "icon" },
{ dimensions: [32, 32], image_format: "png", prefix: "favicon", rel: "icon" },
{ dimensions: [64, 64], image_format: "png", prefix: "favicon", rel: "icon" },
{ dimensions: [96, 96], image_format: "png", prefix: "favicon", rel: "icon" },
{ dimensions: [180, 180], image_format: "png", prefix: "favicon", rel: "icon" },
{
dimensions: [57, 57],
image_format: "png",
prefix: "apple-touch-icon",
rel: "apple-touch-icon",
},
{
dimensions: [60, 60],
image_format: "png",
prefix: "apple-touch-icon",
rel: "apple-touch-icon",
},
{
dimensions: [72, 72],
image_format: "png",
prefix: "apple-touch-icon",
rel: "apple-touch-icon",
},
{
dimensions: [76, 76],
image_format: "png",
prefix: "apple-touch-icon",
rel: "apple-touch-icon",
},
{
dimensions: [114, 114],
image_format: "png",
prefix: "apple-touch-icon",
rel: "apple-touch-icon",
},
{
dimensions: [120, 120],
image_format: "png",
prefix: "apple-touch-icon",
rel: "apple-touch-icon",
},
{
dimensions: [144, 144],
image_format: "png",
prefix: "apple-touch-icon",
rel: "apple-touch-icon",
},
{
dimensions: [152, 152],
image_format: "png",
prefix: "apple-touch-icon",
rel: "apple-touch-icon",
},
{
dimensions: [167, 167],
image_format: "png",
prefix: "apple-touch-icon",
rel: "apple-touch-icon",
},
{
dimensions: [180, 180],
image_format: "png",
prefix: "apple-touch-icon",
rel: "apple-touch-icon",
},
{ dimensions: [70, 70], image_format: "png", prefix: "mstile", rel: null },
{ dimensions: [270, 270], image_format: "png", prefix: "mstile", rel: null },
{ dimensions: [310, 310], image_format: "png", prefix: "mstile", rel: null },
{ dimensions: [310, 150], image_format: "png", prefix: "mstile", rel: null },
{ dimensions: [196, 196], image_format: "png", prefix: "favicon", rel: "shortcut icon" },
] as Favicon[];
29 changes: 0 additions & 29 deletions docs/next.config.js

This file was deleted.

35 changes: 35 additions & 0 deletions docs/next.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import fs from "node:fs";
import path from "node:path";
import { fileURLToPath } from "node:url";
import withNextra from "nextra";

function copyChangelog() {
const dir = path.dirname(fileURLToPath(import.meta.url));
const src = path.resolve(dir, "..", "CHANGELOG.md");
const data = fs.readFileSync(src);
const replaced = data.toString().replace("# Changelog\n\n", "");
const dst = path.resolve(dir, "pages", "changelog.mdx");
fs.writeFileSync(dst, replaced);
}

copyChangelog();

/**
* @type {import('nextra').NextraConfig}
*/
const nextraConfig = {
theme: "nextra-theme-docs",
themeConfig: "./theme.config.tsx",
};

/**
* @type {import('next').NextConfig}
*/
const config = {
images: {
unoptimized: true,
},
output: "export",
};

export default withNextra(nextraConfig)(config);
4 changes: 2 additions & 2 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
"license": "BSD-3-Clause-Clear",
"dependencies": {
"next": "^14.1.1",
"nextra": "^2.13.4",
"nextra-theme-docs": "^2.13.4",
"nextra": "3.0.0-alpha.24",
"nextra-theme-docs": "3.0.0-alpha.24",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
Expand Down
38 changes: 0 additions & 38 deletions docs/pages/_meta.json

This file was deleted.

38 changes: 38 additions & 0 deletions docs/pages/_meta.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
export default {
index: { title: "Introduction", theme: { breadcrumb: false } },
"---": {
type: "separator",
},
installation: "Installation",
configuration: "Configuration",
platforms: "Platforms",
plugins: "Plugins",
documentation: {
title: "Documentation",
type: "menu",
items: {
installation: {
title: "Installation",
href: "/installation",
},
configuration: {
title: "Configuration",
href: "/configuration",
},
plugins: {
title: "Plugins",
href: "/plugins",
},
changelog: {
title: "Changelog",
href: "/changelog",
},
},
},
demo: {
title: "Demo",
type: "page",
href: "https://demo.hyperglass.dev",
newWindow: true,
},
};
7 changes: 0 additions & 7 deletions docs/pages/configuration/_meta.json

This file was deleted.

7 changes: 7 additions & 0 deletions docs/pages/configuration/_meta.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default {
overview: "Overview",
config: "Config File",
devices: "Devices File",
directives: "Directives File",
examples: "Examples",
};
8 changes: 0 additions & 8 deletions docs/pages/configuration/config/_meta.json

This file was deleted.

8 changes: 8 additions & 0 deletions docs/pages/configuration/config/_meta.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default {
"api-docs": "API Docs",
caching: "Caching",
logging: "Logging & Webhooks",
messages: "Messages",
"structured-output": "Structured Output",
"web-ui": "Web UI",
};
2 changes: 1 addition & 1 deletion docs/pages/configuration/config/web-ui.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Callout } from "nextra-theme-docs";
import { Callout } from "nextra/components";
import { Color } from "~/components/color";

## Web UI
Expand Down
17 changes: 13 additions & 4 deletions docs/pages/configuration/devices.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Callout } from "nextra-theme-docs";
import { Callout } from "nextra/components";
import { SupportedPlatforms } from "~/components/platforms";
import { DocsButton } from "~/components/docs-button";

Expand Down Expand Up @@ -76,7 +76,10 @@ devices:
password: your password
```
### <DocsButton href="/configuration/directives.mdx"/> With Directives
<h3 className="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl">
{" "}
<DocsButton href="/configuration/directives" /> With Directives
</h3>
In this example, an additional directive `cisco-show-lldp-neighbors` is added to the built-in directives.

Expand All @@ -92,7 +95,10 @@ devices:
- cisco-show-lldp-neighbors
```

### <DocsButton href="/configuration/directives.mdx"/> Disable Built-in Directives
<h3 className="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl">
{" "}
<DocsButton href="/configuration/directives" /> Disable Built-in Directives
</h3>

In this example, _only_ the `cisco-show-lldp-neighbors` directive will be available. Built-in directives are disabled.

Expand All @@ -109,7 +115,10 @@ devices:
- cisco-show-lldp-neighbors
```

### <DocsButton href="/configuration/directives.mdx"/> Enable Specifc Built-in Directives
<h3 className="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl">
{" "}
<DocsButton href="/configuration/directives" /> Enable Specifc Built-in Directives
</h3>

In this example, only specified built-in directives are made available.

Expand Down
5 changes: 0 additions & 5 deletions docs/pages/configuration/devices/_meta.json

This file was deleted.

Loading

0 comments on commit 556dccf

Please sign in to comment.