update docs backend

fixes issue with OpenGraph tags
This commit is contained in:
thatmattlove 2024-05-28 21:30:33 -04:00
parent ce1b720267
commit 556dccf509
32 changed files with 2733 additions and 1986 deletions

View file

@ -6,75 +6,75 @@ interface Favicon {
} }
export default [ export default [
{ dimensions: [64, 64], image_format: 'ico', prefix: 'favicon', rel: null }, { dimensions: [48, 48], image_format: "ico", prefix: "favicon", rel: null },
{ dimensions: [16, 16], image_format: 'png', prefix: 'favicon', rel: 'icon' }, { dimensions: [16, 16], image_format: "png", prefix: "favicon", rel: "icon" },
{ dimensions: [32, 32], 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: [64, 64], image_format: "png", prefix: "favicon", rel: "icon" },
{ dimensions: [96, 96], 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: [180, 180], image_format: "png", prefix: "favicon", rel: "icon" },
{ {
dimensions: [57, 57], dimensions: [57, 57],
image_format: 'png', image_format: "png",
prefix: 'apple-touch-icon', prefix: "apple-touch-icon",
rel: 'apple-touch-icon', rel: "apple-touch-icon",
}, },
{ {
dimensions: [60, 60], dimensions: [60, 60],
image_format: 'png', image_format: "png",
prefix: 'apple-touch-icon', prefix: "apple-touch-icon",
rel: 'apple-touch-icon', rel: "apple-touch-icon",
}, },
{ {
dimensions: [72, 72], dimensions: [72, 72],
image_format: 'png', image_format: "png",
prefix: 'apple-touch-icon', prefix: "apple-touch-icon",
rel: 'apple-touch-icon', rel: "apple-touch-icon",
}, },
{ {
dimensions: [76, 76], dimensions: [76, 76],
image_format: 'png', image_format: "png",
prefix: 'apple-touch-icon', prefix: "apple-touch-icon",
rel: 'apple-touch-icon', rel: "apple-touch-icon",
}, },
{ {
dimensions: [114, 114], dimensions: [114, 114],
image_format: 'png', image_format: "png",
prefix: 'apple-touch-icon', prefix: "apple-touch-icon",
rel: 'apple-touch-icon', rel: "apple-touch-icon",
}, },
{ {
dimensions: [120, 120], dimensions: [120, 120],
image_format: 'png', image_format: "png",
prefix: 'apple-touch-icon', prefix: "apple-touch-icon",
rel: 'apple-touch-icon', rel: "apple-touch-icon",
}, },
{ {
dimensions: [144, 144], dimensions: [144, 144],
image_format: 'png', image_format: "png",
prefix: 'apple-touch-icon', prefix: "apple-touch-icon",
rel: 'apple-touch-icon', rel: "apple-touch-icon",
}, },
{ {
dimensions: [152, 152], dimensions: [152, 152],
image_format: 'png', image_format: "png",
prefix: 'apple-touch-icon', prefix: "apple-touch-icon",
rel: 'apple-touch-icon', rel: "apple-touch-icon",
}, },
{ {
dimensions: [167, 167], dimensions: [167, 167],
image_format: 'png', image_format: "png",
prefix: 'apple-touch-icon', prefix: "apple-touch-icon",
rel: 'apple-touch-icon', rel: "apple-touch-icon",
}, },
{ {
dimensions: [180, 180], dimensions: [180, 180],
image_format: 'png', image_format: "png",
prefix: 'apple-touch-icon', prefix: "apple-touch-icon",
rel: 'apple-touch-icon', rel: "apple-touch-icon",
}, },
{ dimensions: [70, 70], image_format: 'png', prefix: 'mstile', rel: null }, { dimensions: [70, 70], image_format: "png", prefix: "mstile", rel: null },
{ dimensions: [270, 270], 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, 310], image_format: "png", prefix: "mstile", rel: null },
{ dimensions: [310, 150], 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: [196, 196], image_format: "png", prefix: "favicon", rel: "shortcut icon" },
] as Favicon[]; ] as Favicon[];

View file

@ -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
View 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);

View file

@ -12,8 +12,8 @@
"license": "BSD-3-Clause-Clear", "license": "BSD-3-Clause-Clear",
"dependencies": { "dependencies": {
"next": "^14.1.1", "next": "^14.1.1",
"nextra": "^2.13.4", "nextra": "3.0.0-alpha.24",
"nextra-theme-docs": "^2.13.4", "nextra-theme-docs": "3.0.0-alpha.24",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0" "react-dom": "^18.2.0"
}, },

View file

@ -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
View 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,
},
};

View file

@ -1,7 +0,0 @@
{
"overview": "Overview",
"config": "Config File",
"devices": "Devices File",
"directives": "Directives File",
"examples": "Examples"
}

View file

@ -0,0 +1,7 @@
export default {
overview: "Overview",
config: "Config File",
devices: "Devices File",
directives: "Directives File",
examples: "Examples",
};

View file

@ -1,8 +0,0 @@
{
"api-docs": "API Docs",
"caching": "Caching",
"logging": "Logging & Webhooks",
"messages": "Messages",
"structured-output": "Structured Output",
"web-ui": "Web UI"
}

View 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",
};

View file

@ -1,4 +1,4 @@
import { Callout } from "nextra-theme-docs"; import { Callout } from "nextra/components";
import { Color } from "~/components/color"; import { Color } from "~/components/color";
## Web UI ## Web UI

View file

@ -1,4 +1,4 @@
import { Callout } from "nextra-theme-docs"; import { Callout } from "nextra/components";
import { SupportedPlatforms } from "~/components/platforms"; import { SupportedPlatforms } from "~/components/platforms";
import { DocsButton } from "~/components/docs-button"; import { DocsButton } from "~/components/docs-button";
@ -76,7 +76,10 @@ devices:
password: your password 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. 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 - 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. 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 - 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. In this example, only specified built-in directives are made available.

View file

@ -1,5 +0,0 @@
{
"credentials": "Credentials",
"http-device": "HTTP Device",
"ssh-proxy": "SSH Proxy"
}

View file

@ -0,0 +1,5 @@
export default {
credentials: "Credentials",
"http-device": "HTTP Device",
"ssh-proxy": "SSH Proxy",
};

View file

@ -1,4 +1,4 @@
import { Callout } from "nextra-theme-docs"; import { Callout } from "nextra/components";
## What is a directive? ## What is a directive?

View file

@ -1,5 +0,0 @@
{
"basic-configuration": "Basic Configuration",
"add-your-own-command": "Add Your Own Command",
"customize-the-ui": "Customize the UI"
}

View 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",
};

View file

@ -3,7 +3,7 @@ title: Basic Configuration
description: Get started with a basic hyperglass 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. To get started, hyperglass only needs to know about your devices.

View file

@ -2,16 +2,22 @@
description: Customize hyperglass to fit your needs. 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" ```yaml filename="config.yaml"
site_title: Our super neat looking glass site_title: Our super neat looking glass
org_name: Cool Company 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 ```yaml filename="config.yaml" {2-4} copy
web: web:
@ -20,7 +26,10 @@ web:
dark: <path to logo image file to use in dark mode> 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} ```yaml filename="config.yaml" copy {3-5}
web: web:
@ -30,7 +39,10 @@ web:
secondary: "#118ab2" 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 ```yaml filename="config.yaml" copy
web: web:

View file

@ -1,5 +1,4 @@
import { Code, Table, Td, Th, Tr } from "nextra/components"; import { Code, Table, Td, Th, Tr, Callout } from "nextra/components";
import { Callout } from "nextra-theme-docs";
import { SupportedPlatforms } from "~/components/platforms"; 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. 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.

View file

@ -3,12 +3,14 @@ title: Introduction
description: Get started with hyperglass description: Get started with hyperglass
--- ---
import { Cards, Card } from "nextra/components"; import { Cards } from "nextra/components";
import { SupportedPlatforms } from "~/components/platforms"; import { SupportedPlatforms } from "~/components/platforms";
## What is hyperglass? ## 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. 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 - Browser-based DNS-over-HTTPS resolution of FQDN queries
<Cards> <Cards>
<Card title="Get Started" href="installation/docker" arrow /> <Cards.Card title="Get Started" href="installation/docker" arrow />
</Cards> </Cards>

View file

@ -1,11 +1,11 @@
import { Cards, Card } from "nextra/components"; import { Cards } from "nextra/components";
<Cards> <Cards>
<Card href="installation/docker" title="Using Docker" /> <Cards.Card href="installation/docker" title="Using Docker" />
<Card href="installation/manual" title="Manual Installation" /> <Cards.Card href="installation/manual" title="Manual Installation" />
</Cards> </Cards>
<Cards> <Cards>
<Card href="installation/environment-variables" title="Environment Variables" /> <Cards.Card href="installation/environment-variables" title="Environment Variables" />
<Card href="installation/reverse-proxy" title="Reverse Proxy" /> <Cards.Card href="installation/reverse-proxy" title="Reverse Proxy" />
</Cards> </Cards>

View file

@ -1,7 +0,0 @@
{
"docker": "Using Docker",
"manual": "Manual Installation",
"environment-variables": "Environment Variables",
"reverse-proxy": "Reverse Proxy",
"upgrading": "Upgrading hyperglass"
}

View file

@ -0,0 +1,7 @@
export default {
docker: "Using Docker",
manual: "Manual Installation",
"environment-variables": "Environment Variables",
"reverse-proxy": "Reverse Proxy",
upgrading: "Upgrading hyperglass",
};

View file

@ -3,8 +3,8 @@ title: Using Docker
description: Installing hyperglass with Docker description: Installing hyperglass with Docker
--- ---
import { Card, Cards, Steps } from "nextra/components"; import { Cards, Steps, Callout } from "nextra/components";
import { Callout } from "nextra-theme-docs"; // import { Callout } from "nextra-theme-docs";
<Callout type="info">**Docker is the recommended method for running hyperglass.**</Callout> <Callout type="info">**Docker is the recommended method for running hyperglass.**</Callout>
@ -13,7 +13,7 @@ import { Callout } from "nextra-theme-docs";
### Install Docker ### Install Docker
<Cards> <Cards>
<Card <Cards.Card
title="Docker Engine Installation Guide" title="Docker Engine Installation Guide"
href="https://docs.docker.com/engine/install/" href="https://docs.docker.com/engine/install/"
target="_blank" target="_blank"
@ -26,9 +26,8 @@ import { Callout } from "nextra-theme-docs";
```shell copy ```shell copy
mkdir /etc/hyperglass mkdir /etc/hyperglass
cd /opt cd /opt
git clone https://github.com/thatmattlove/hyperglass.git git clone https://github.com/thatmattlove/hyperglass.git --depth=1
cd /opt/hyperglass cd /opt/hyperglass
git checkout v2.0.0
``` ```
### Optional: Quickstart ### Optional: Quickstart

View file

@ -3,8 +3,7 @@ title: Manual Installation
description: Installing hyperglass manually description: Installing hyperglass manually
--- ---
import { Steps } from "nextra/components"; import { Steps, Callout } from "nextra/components";
import { Callout } from "nextra-theme-docs";
<Steps> <Steps>
@ -12,8 +11,8 @@ import { Callout } from "nextra-theme-docs";
To install hyperglass manually, you'll need to install the following dependencies: 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/) 1. [Python 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) 2. [NodeJS 20.14 or later](https://nodejs.org/en/download)
3. [PNPM 8 or later](https://pnpm.io/installation) 3. [PNPM 8 or later](https://pnpm.io/installation)
4. [Redis 7.2 or later](https://redis.io/download/) 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: Once these dependencies are installed, install hyperglass via PyPI:
```shell copy ```shell copy
pip3 install hyperglass git clone https://github.com/thatmattlove/hyperglass --depth=1
cd hyperglass
pip3 install -e .
``` ```
### Create app directory ### 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. Do this if you just want to see the hyperglass page working with default settings and a fake device.
```shell copy ```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 hyperglass start
``` ```
### Create a `systemd` service ### Create a `systemd` service
```shell copy ```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 ln -s /etc/hyperglass/hyperglass.service /etc/systemd/system/hyperglass.service
systemctl daemon-reload systemctl daemon-reload
systemctl enable hyperglass systemctl enable hyperglass

View file

@ -3,15 +3,19 @@ title: Reverse Proxy
description: Setting up a reverse proxy for hyperglass description: Setting up a reverse proxy for hyperglass
--- ---
import { Cards, Card } from "nextra/components"; import { Cards, Callout } from "nextra/components";
import { Callout } from "nextra-theme-docs";
[Caddy](https://caddyserver.com) is recommended, but any reverse proxy ([NGINX](https://www.nginx.com), [Apache2](https://httpd.apache.org)) will work. [Caddy](https://caddyserver.com) is recommended, but any reverse proxy ([NGINX](https://www.nginx.com), [Apache2](https://httpd.apache.org)) will work.
## Caddy ## Caddy
<Cards> <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> </Cards>
```shell copy ```shell copy

View file

@ -2,7 +2,7 @@
description: Platforms supported by hyperglass description: Platforms supported by hyperglass
--- ---
import { Callout } from "nextra-theme-docs"; import { Callout } from "nextra/components";
import { PlatformTable } from "~/components/platforms"; 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. 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.

View file

@ -121,7 +121,7 @@ class Redact(OutputPlugin):
If the query output was: 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. 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 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 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: 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. 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 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 scelerisque eu ultrices vitae. Accumsan <REDACTED> tortor posuere ac ut consequat semper viverra nam libero. Libero id faucibus nisl

4100
docs/pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

View file

@ -1,5 +1,6 @@
import { useRouter } from "next/router"; import { useRouter } from "next/router";
import { type DocsThemeConfig, useConfig } from "nextra-theme-docs"; import { type DocsThemeConfig, useConfig } from "nextra-theme-docs";
import "nextra-theme-docs/style.css";
import faviconFormats from "./favicon-formats"; import faviconFormats from "./favicon-formats";
import styles from "./global.module.css"; import styles from "./global.module.css";
@ -71,49 +72,53 @@ const config: DocsThemeConfig = {
</svg> </svg>
</span> </span>
), ),
head: () => {
useNextSeoProps: () => { const { asPath, locale, defaultLocale } = useRouter();
const { asPath } = useRouter(); const { frontMatter } = useConfig();
const { frontMatter, title } = useConfig(); const url = `https://hyperglass.dev${
return { defaultLocale === locale ? asPath : `/${locale}${asPath}`
titleTemplate: "%s | hyperglass", }`;
title: frontMatter.title || title, let title = frontMatter.title || "hyperglass";
openGraph: { if (title !== "hyperglass") {
type: "website", title = `${title} | hyperglass`;
url: `https://hyperglass.dev${asPath}`, }
title: frontMatter.title || title, const description = frontMatter.description || "hyperglass Documentation";
description: frontMatter.description || "hyperglass Documentation", const index = NO_INDEX_FOLLOW ? "noindex, nofollow" : "index, follow";
images: [ const favicons = faviconFormats.map((fmt) => {
{
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) => {
const { image_format, dimensions, prefix, rel } = fmt; const { image_format, dimensions, prefix, rel } = fmt;
const [w, h] = dimensions; const [w, h] = dimensions;
const href = `/img/${prefix}-${w}x${h}.${image_format}`; const href = `/img/${prefix}-${w}x${h}.${image_format}`;
return { rel: rel ?? "", href, type: `image/${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: { banner: {
dismissible: true, dismissible: true,
// text: "🎉 hyperglass 2.0 is here!", content: "🎉 hyperglass 2.0 is here! This documentation is still in development, though.",
text: "😬 hyperglass 2.0 and its documentation is still in development!",
}, },
feedback: { content: null }, feedback: { content: null },
footer: { text: `© ${new Date().getFullYear()} hyperglass` }, footer: { content: `© ${new Date().getFullYear()} hyperglass` },
editLink: { component: null }, editLink: { component: null },
chat: { chat: {
link: "https://netdev.chat/", link: "https://netdev.chat/",

View file

@ -22,5 +22,5 @@
}, },
"exclude": ["node_modules", ".next"], "exclude": ["node_modules", ".next"],
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "next.config.js"] "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", "next.config.mjs"]
} }