forked from mirrors/thatmattlove-hyperglass
update docs backend
fixes issue with OpenGraph tags
This commit is contained in:
parent
ce1b720267
commit
556dccf509
32 changed files with 2733 additions and 1986 deletions
|
|
@ -6,75 +6,75 @@ interface Favicon {
|
|||
}
|
||||
|
||||
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: [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',
|
||||
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',
|
||||
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',
|
||||
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',
|
||||
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',
|
||||
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',
|
||||
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',
|
||||
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',
|
||||
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',
|
||||
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',
|
||||
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: [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[];
|
||||
|
|
|
|||
|
|
@ -1,29 +0,0 @@
|
|||
const fs = require("node:fs");
|
||||
const path = require("node:path");
|
||||
|
||||
function copyChangelog() {
|
||||
const src = path.resolve(__dirname, "..", "CHANGELOG.md");
|
||||
const data = fs.readFileSync(src);
|
||||
const replaced = data.toString().replace("# Changelog\n\n", "");
|
||||
const dst = path.resolve(__dirname, "pages", "changelog.mdx");
|
||||
fs.writeFileSync(dst, replaced);
|
||||
}
|
||||
|
||||
copyChangelog();
|
||||
|
||||
const withNextra = require("nextra")({
|
||||
theme: "nextra-theme-docs",
|
||||
themeConfig: "./theme.config.tsx",
|
||||
});
|
||||
|
||||
/**
|
||||
* @type {import('next').NextConfig}
|
||||
*/
|
||||
const config = {
|
||||
images: {
|
||||
unoptimized: true,
|
||||
},
|
||||
output: "export",
|
||||
};
|
||||
|
||||
module.exports = withNextra(config);
|
||||
35
docs/next.config.mjs
Normal file
35
docs/next.config.mjs
Normal file
|
|
@ -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);
|
||||
|
|
@ -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"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,38 +0,0 @@
|
|||
{
|
||||
"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
|
||||
}
|
||||
}
|
||||
38
docs/pages/_meta.tsx
Normal file
38
docs/pages/_meta.tsx
Normal file
|
|
@ -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,
|
||||
},
|
||||
};
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"overview": "Overview",
|
||||
"config": "Config File",
|
||||
"devices": "Devices File",
|
||||
"directives": "Directives File",
|
||||
"examples": "Examples"
|
||||
}
|
||||
7
docs/pages/configuration/_meta.tsx
Normal file
7
docs/pages/configuration/_meta.tsx
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
export default {
|
||||
overview: "Overview",
|
||||
config: "Config File",
|
||||
devices: "Devices File",
|
||||
directives: "Directives File",
|
||||
examples: "Examples",
|
||||
};
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
{
|
||||
"api-docs": "API Docs",
|
||||
"caching": "Caching",
|
||||
"logging": "Logging & Webhooks",
|
||||
"messages": "Messages",
|
||||
"structured-output": "Structured Output",
|
||||
"web-ui": "Web UI"
|
||||
}
|
||||
8
docs/pages/configuration/config/_meta.tsx
Normal file
8
docs/pages/configuration/config/_meta.tsx
Normal file
|
|
@ -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",
|
||||
};
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { Callout } from "nextra-theme-docs";
|
||||
import { Callout } from "nextra/components";
|
||||
import { Color } from "~/components/color";
|
||||
|
||||
## Web UI
|
||||
|
|
|
|||
|
|
@ -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";
|
||||
|
||||
|
|
@ -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.
|
||||
|
||||
|
|
@ -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.
|
||||
|
||||
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"credentials": "Credentials",
|
||||
"http-device": "HTTP Device",
|
||||
"ssh-proxy": "SSH Proxy"
|
||||
}
|
||||
5
docs/pages/configuration/devices/_meta.tsx
Normal file
5
docs/pages/configuration/devices/_meta.tsx
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
export default {
|
||||
credentials: "Credentials",
|
||||
"http-device": "HTTP Device",
|
||||
"ssh-proxy": "SSH Proxy",
|
||||
};
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import { Callout } from "nextra-theme-docs";
|
||||
import { Callout } from "nextra/components";
|
||||
|
||||
## What is a directive?
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"basic-configuration": "Basic Configuration",
|
||||
"add-your-own-command": "Add Your Own Command",
|
||||
"customize-the-ui": "Customize the UI"
|
||||
}
|
||||
5
docs/pages/configuration/examples/_meta.tsx
Normal file
5
docs/pages/configuration/examples/_meta.tsx
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
export default {
|
||||
"basic-configuration": "Basic Configuration",
|
||||
"add-your-own-command": "Add Your Own Command",
|
||||
"customize-the-ui": "Customize the UI",
|
||||
};
|
||||
|
|
@ -3,7 +3,7 @@ title: Basic Configuration
|
|||
description: Get started with a basic hyperglass configuration
|
||||
---
|
||||
|
||||
import { Callout } from "nextra-theme-docs";
|
||||
import { Callout } from "nextra/components";
|
||||
|
||||
To get started, hyperglass only needs to know about your devices.
|
||||
|
||||
|
|
|
|||
|
|
@ -2,16 +2,22 @@
|
|||
description: Customize hyperglass to fit your needs.
|
||||
---
|
||||
|
||||
import { DocsButton } from "../../../components/docs-button";
|
||||
import { DocsButton } from "~/components/docs-button";
|
||||
|
||||
### <DocsButton href="/configuration/config" /> Change the Title and Organization Name
|
||||
<h3 className="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl">
|
||||
{" "}
|
||||
<DocsButton href="/configuration/config" /> Change the Title and Organization Name
|
||||
</h3>
|
||||
|
||||
```yaml filename="config.yaml"
|
||||
site_title: Our super neat looking glass
|
||||
org_name: Cool Company
|
||||
```
|
||||
|
||||
### <DocsButton href="/configuration/config/web-ui#logo" /> Change the Logo
|
||||
<h3 className="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl">
|
||||
{" "}
|
||||
<DocsButton href="/configuration/config/web-ui#logo" /> Change the Logo
|
||||
</h3>
|
||||
|
||||
```yaml filename="config.yaml" {2-4} copy
|
||||
web:
|
||||
|
|
@ -20,7 +26,10 @@ web:
|
|||
dark: <path to logo image file to use in dark mode>
|
||||
```
|
||||
|
||||
### <DocsButton href="/configuration/config/web-ui#theme" /> Change the Color Scheme
|
||||
<h3 className="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl">
|
||||
{" "}
|
||||
<DocsButton href="/configuration/config/web-ui#theme" /> Change the Color Scheme
|
||||
</h3>
|
||||
|
||||
```yaml filename="config.yaml" copy {3-5}
|
||||
web:
|
||||
|
|
@ -30,7 +39,10 @@ web:
|
|||
secondary: "#118ab2"
|
||||
```
|
||||
|
||||
### <DocsButton href="/configuration/config/web-ui#menus" /> Add a Link to the Footer
|
||||
<h3 className="_font-semibold _tracking-tight _text-slate-900 dark:_text-slate-100 _mt-8 _text-2xl">
|
||||
{" "}
|
||||
<DocsButton href="/configuration/config/web-ui#menus" /> Add a Link to the Footer
|
||||
</h3>
|
||||
|
||||
```yaml filename="config.yaml" copy
|
||||
web:
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import { Code, Table, Td, Th, Tr } from "nextra/components";
|
||||
import { Callout } from "nextra-theme-docs";
|
||||
import { Code, Table, Td, Th, Tr, Callout } from "nextra/components";
|
||||
import { SupportedPlatforms } from "~/components/platforms";
|
||||
|
||||
Once you've gotten started with a basic configuration, you'll probably want to customize the look and feel of hyperglass by changing the logo or color scheme. Fortunately, there are _a lot_ ways to customize hyperglass.
|
||||
|
|
|
|||
|
|
@ -3,12 +3,14 @@ title: Introduction
|
|||
description: Get started with hyperglass
|
||||
---
|
||||
|
||||
import { Cards, Card } from "nextra/components";
|
||||
import { Cards } from "nextra/components";
|
||||
import { SupportedPlatforms } from "~/components/platforms";
|
||||
|
||||
## What is hyperglass?
|
||||
|
||||
**hyperglass** is an open source network looking glass written by a network engineer for other network engineers. The purpose of a looking glass is to provide customers, peers, and complete strangers with unattended visibility into the an operator's network.
|
||||
<strong style={{ color: "#ff5e5b" }}>hyperglass</strong> is an open source network looking glass written
|
||||
by a network engineer for other network engineers. The purpose of a looking glass is to provide customers,
|
||||
peers, and complete strangers with unattended visibility into the an operator's network.
|
||||
|
||||
hyperglass was created with the lofty goal of benefiting the internet community at-large by providing a faster, easier, and more secure way for operators to provide looking glass services to their customers, peers, and other network operators.
|
||||
|
||||
|
|
@ -29,5 +31,5 @@ hyperglass was created with the lofty goal of benefiting the internet community
|
|||
- Browser-based DNS-over-HTTPS resolution of FQDN queries
|
||||
|
||||
<Cards>
|
||||
<Card title="Get Started" href="installation/docker" arrow />
|
||||
<Cards.Card title="Get Started" href="installation/docker" arrow />
|
||||
</Cards>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
import { Cards, Card } from "nextra/components";
|
||||
import { Cards } from "nextra/components";
|
||||
|
||||
<Cards>
|
||||
<Card href="installation/docker" title="Using Docker" />
|
||||
<Card href="installation/manual" title="Manual Installation" />
|
||||
<Cards.Card href="installation/docker" title="Using Docker" />
|
||||
<Cards.Card href="installation/manual" title="Manual Installation" />
|
||||
</Cards>
|
||||
|
||||
<Cards>
|
||||
<Card href="installation/environment-variables" title="Environment Variables" />
|
||||
<Card href="installation/reverse-proxy" title="Reverse Proxy" />
|
||||
<Cards.Card href="installation/environment-variables" title="Environment Variables" />
|
||||
<Cards.Card href="installation/reverse-proxy" title="Reverse Proxy" />
|
||||
</Cards>
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"docker": "Using Docker",
|
||||
"manual": "Manual Installation",
|
||||
"environment-variables": "Environment Variables",
|
||||
"reverse-proxy": "Reverse Proxy",
|
||||
"upgrading": "Upgrading hyperglass"
|
||||
}
|
||||
7
docs/pages/installation/_meta.tsx
Normal file
7
docs/pages/installation/_meta.tsx
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
export default {
|
||||
docker: "Using Docker",
|
||||
manual: "Manual Installation",
|
||||
"environment-variables": "Environment Variables",
|
||||
"reverse-proxy": "Reverse Proxy",
|
||||
upgrading: "Upgrading hyperglass",
|
||||
};
|
||||
|
|
@ -3,8 +3,8 @@ title: Using Docker
|
|||
description: Installing hyperglass with Docker
|
||||
---
|
||||
|
||||
import { Card, Cards, Steps } from "nextra/components";
|
||||
import { Callout } from "nextra-theme-docs";
|
||||
import { Cards, Steps, Callout } from "nextra/components";
|
||||
// import { Callout } from "nextra-theme-docs";
|
||||
|
||||
<Callout type="info">**Docker is the recommended method for running hyperglass.**</Callout>
|
||||
|
||||
|
|
@ -13,7 +13,7 @@ import { Callout } from "nextra-theme-docs";
|
|||
### Install Docker
|
||||
|
||||
<Cards>
|
||||
<Card
|
||||
<Cards.Card
|
||||
title="Docker Engine Installation Guide"
|
||||
href="https://docs.docker.com/engine/install/"
|
||||
target="_blank"
|
||||
|
|
@ -26,9 +26,8 @@ import { Callout } from "nextra-theme-docs";
|
|||
```shell copy
|
||||
mkdir /etc/hyperglass
|
||||
cd /opt
|
||||
git clone https://github.com/thatmattlove/hyperglass.git
|
||||
git clone https://github.com/thatmattlove/hyperglass.git --depth=1
|
||||
cd /opt/hyperglass
|
||||
git checkout v2.0.0
|
||||
```
|
||||
|
||||
### Optional: Quickstart
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@ title: Manual Installation
|
|||
description: Installing hyperglass manually
|
||||
---
|
||||
|
||||
import { Steps } from "nextra/components";
|
||||
import { Callout } from "nextra-theme-docs";
|
||||
import { Steps, Callout } from "nextra/components";
|
||||
|
||||
<Steps>
|
||||
|
||||
|
|
@ -12,8 +11,8 @@ import { Callout } from "nextra-theme-docs";
|
|||
|
||||
To install hyperglass manually, you'll need to install the following dependencies:
|
||||
|
||||
1. [Python 3.9, 3.10, 3.11, or 3.12](https://www.python.org/downloads/) and [`pip`](https://pip.pypa.io/en/stable/installation/)
|
||||
2. [NodeJS 18.17 or later](https://nodejs.org/en/download)
|
||||
1. [Python 3.11, or 3.12](https://www.python.org/downloads/) and [`pip`](https://pip.pypa.io/en/stable/installation/)
|
||||
2. [NodeJS 20.14 or later](https://nodejs.org/en/download)
|
||||
3. [PNPM 8 or later](https://pnpm.io/installation)
|
||||
4. [Redis 7.2 or later](https://redis.io/download/)
|
||||
|
||||
|
|
@ -24,7 +23,9 @@ To install hyperglass manually, you'll need to install the following dependencie
|
|||
Once these dependencies are installed, install hyperglass via PyPI:
|
||||
|
||||
```shell copy
|
||||
pip3 install hyperglass
|
||||
git clone https://github.com/thatmattlove/hyperglass --depth=1
|
||||
cd hyperglass
|
||||
pip3 install -e .
|
||||
```
|
||||
|
||||
### Create app directory
|
||||
|
|
@ -43,14 +44,14 @@ mkdir /etc/hyperglass
|
|||
Do this if you just want to see the hyperglass page working with default settings and a fake device.
|
||||
|
||||
```shell copy
|
||||
curl -o /etc/hyperglass/devices.yaml https://raw.githubusercontent.com/thatmattlove/hyperglass/v2.0.0/.samples/sample_devices.yaml
|
||||
curl -o /etc/hyperglass/devices.yaml https://raw.githubusercontent.com/thatmattlove/hyperglass/main/.samples/sample_devices.yaml
|
||||
hyperglass start
|
||||
```
|
||||
|
||||
### Create a `systemd` service
|
||||
|
||||
```shell copy
|
||||
curl -o /etc/hyperglass/hyperglass.service https://raw.githubusercontent.com/thatmattlove/hyperglass/v2.0.0/.samples/hyperglass-manual.service
|
||||
curl -o /etc/hyperglass/hyperglass.service https://raw.githubusercontent.com/thatmattlove/hyperglass/main/.samples/hyperglass-manual.service
|
||||
ln -s /etc/hyperglass/hyperglass.service /etc/systemd/system/hyperglass.service
|
||||
systemctl daemon-reload
|
||||
systemctl enable hyperglass
|
||||
|
|
|
|||
|
|
@ -3,15 +3,19 @@ title: Reverse Proxy
|
|||
description: Setting up a reverse proxy for hyperglass
|
||||
---
|
||||
|
||||
import { Cards, Card } from "nextra/components";
|
||||
import { Callout } from "nextra-theme-docs";
|
||||
import { Cards, Callout } from "nextra/components";
|
||||
|
||||
[Caddy](https://caddyserver.com) is recommended, but any reverse proxy ([NGINX](https://www.nginx.com), [Apache2](https://httpd.apache.org)) will work.
|
||||
|
||||
## Caddy
|
||||
|
||||
<Cards>
|
||||
<Card title="Install Caddy" target="_blank" href="https://caddyserver.com/docs/install" arrow />
|
||||
<Cards.Card
|
||||
title="Install Caddy"
|
||||
target="_blank"
|
||||
href="https://caddyserver.com/docs/install"
|
||||
arrow
|
||||
/>
|
||||
</Cards>
|
||||
|
||||
```shell copy
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
description: Platforms supported by hyperglass
|
||||
---
|
||||
|
||||
import { Callout } from "nextra-theme-docs";
|
||||
import { Callout } from "nextra/components";
|
||||
import { PlatformTable } from "~/components/platforms";
|
||||
|
||||
hyperglass uses [Netmiko](https://github.com/ktbyers/netmiko) to interact with devices via SSH/telnet. [All platforms supported by Netmiko](https://github.com/ktbyers/netmiko/blob/develop/PLATFORMS.md) are supported by hyperglass.
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ class Redact(OutputPlugin):
|
|||
|
||||
If the query output was:
|
||||
|
||||
```
|
||||
```text
|
||||
Lorem ipsum dolor sit amet, SuperSecretInfo consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
||||
Viverra suspendisse potenti nullam ac. At elementum eu facilisis sed odio morbi. SuperSecretInfo iaculis urna id volutpat lacus.Nisl nisi
|
||||
scelerisque eu ultrices vitae. Accumsan SuperSecretInfo tortor posuere ac ut consequat semper viverra nam libero. Libero id faucibus nisl
|
||||
|
|
@ -133,7 +133,7 @@ diam in arcu cursus SuperSecretInfo.
|
|||
|
||||
The above plugin would transform the output to:
|
||||
|
||||
```
|
||||
```text
|
||||
Lorem ipsum dolor sit amet, <REDACTED> consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
|
||||
Viverra suspendisse potenti nullam ac. At elementum eu facilisis sed odio morbi. <REDACTED> iaculis urna id volutpat lacus.Nisl nisi
|
||||
scelerisque eu ultrices vitae. Accumsan <REDACTED> tortor posuere ac ut consequat semper viverra nam libero. Libero id faucibus nisl
|
||||
|
|
|
|||
4096
docs/pnpm-lock.yaml
generated
4096
docs/pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load diff
|
|
@ -1,5 +1,6 @@
|
|||
import { useRouter } from "next/router";
|
||||
import { type DocsThemeConfig, useConfig } from "nextra-theme-docs";
|
||||
import "nextra-theme-docs/style.css";
|
||||
import faviconFormats from "./favicon-formats";
|
||||
import styles from "./global.module.css";
|
||||
|
||||
|
|
@ -71,49 +72,53 @@ const config: DocsThemeConfig = {
|
|||
</svg>
|
||||
</span>
|
||||
),
|
||||
|
||||
useNextSeoProps: () => {
|
||||
const { asPath } = useRouter();
|
||||
const { frontMatter, title } = useConfig();
|
||||
return {
|
||||
titleTemplate: "%s | hyperglass",
|
||||
title: frontMatter.title || title,
|
||||
openGraph: {
|
||||
type: "website",
|
||||
url: `https://hyperglass.dev${asPath}`,
|
||||
title: frontMatter.title || title,
|
||||
description: frontMatter.description || "hyperglass Documentation",
|
||||
images: [
|
||||
{
|
||||
url: "https://hyperglass.dev/opengraph.jpg",
|
||||
width: 1200,
|
||||
height: 630,
|
||||
alt: "hyperglass",
|
||||
},
|
||||
],
|
||||
},
|
||||
twitter: {
|
||||
handle: "@thatmattlove",
|
||||
site: "@thatmattlove",
|
||||
cardType: "summary_large_image",
|
||||
},
|
||||
noindex: NO_INDEX_FOLLOW,
|
||||
nofollow: NO_INDEX_FOLLOW,
|
||||
additionalLinkTags: faviconFormats.map((fmt) => {
|
||||
head: () => {
|
||||
const { asPath, locale, defaultLocale } = useRouter();
|
||||
const { frontMatter } = useConfig();
|
||||
const url = `https://hyperglass.dev${
|
||||
defaultLocale === locale ? asPath : `/${locale}${asPath}`
|
||||
}`;
|
||||
let title = frontMatter.title || "hyperglass";
|
||||
if (title !== "hyperglass") {
|
||||
title = `${title} | hyperglass`;
|
||||
}
|
||||
const description = frontMatter.description || "hyperglass Documentation";
|
||||
const index = NO_INDEX_FOLLOW ? "noindex, nofollow" : "index, follow";
|
||||
const favicons = faviconFormats.map((fmt) => {
|
||||
const { image_format, dimensions, prefix, rel } = fmt;
|
||||
const [w, h] = dimensions;
|
||||
const href = `/img/${prefix}-${w}x${h}.${image_format}`;
|
||||
return { rel: rel ?? "", href, type: `image/${image_format}` };
|
||||
}),
|
||||
};
|
||||
});
|
||||
|
||||
return (
|
||||
<head>
|
||||
<title>{title}</title>
|
||||
<meta property="og:url" content={url} />
|
||||
<meta property="og:title" content={title} />
|
||||
<meta property="og:description" content={description} />
|
||||
<meta property="og:type" content="website" />
|
||||
<meta name="twitter:card" content="summary_large_image" />
|
||||
<meta property="twitter:domain" content="hyperglass.dev" />
|
||||
<meta property="twitter:url" content="https://hyperglass.dev" />
|
||||
<meta name="twitter:title" content={title} />
|
||||
<meta name="twitter:description" content={description} />
|
||||
<meta name="twitter:image" content="https://hyperglass.dev/opengraph.jpg" />
|
||||
<meta name="robots" content={index} />
|
||||
<link rel="manifest" href="/img/manifest.json" />
|
||||
{favicons.map((props) => (
|
||||
<link key={props.href} {...props} />
|
||||
))}
|
||||
</head>
|
||||
);
|
||||
},
|
||||
docsRepositoryBase: "https://github.com/thatmattlove/hyperglass/tree/main/docs",
|
||||
banner: {
|
||||
dismissible: true,
|
||||
// text: "🎉 hyperglass 2.0 is here!",
|
||||
text: "😬 hyperglass 2.0 and its documentation is still in development!",
|
||||
content: "🎉 hyperglass 2.0 is here! This documentation is still in development, though.",
|
||||
},
|
||||
feedback: { content: null },
|
||||
footer: { text: `© ${new Date().getFullYear()} hyperglass` },
|
||||
footer: { content: `© ${new Date().getFullYear()} hyperglass` },
|
||||
editLink: { component: null },
|
||||
chat: {
|
||||
link: "https://netdev.chat/",
|
||||
|
|
|
|||
|
|
@ -22,5 +22,5 @@
|
|||
},
|
||||
|
||||
"exclude": ["node_modules", ".next"],
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "next.config.js"]
|
||||
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "next.config.mjs"]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue