forked from mirrors/thatmattlove-hyperglass
add UI build to setup flow & clarify docs per #79
This commit is contained in:
parent
3cbbbed968
commit
a4664e9f3f
3 changed files with 29 additions and 19 deletions
|
|
@ -60,16 +60,3 @@ hyperglass also includes a [systemd](https://systemd.io/) service file, which ca
|
|||
```shell-session
|
||||
$ sudo systemctl enable hyperglass
|
||||
```
|
||||
|
||||
## UI Build
|
||||
|
||||
hyperglass is build with [NextJS](https://nextjs.org/), a [React](https://reactjs.org/)-based UI framework that supports server-side rendering and static exporting, which contribute to hyperglass's speed and SEO-friendliness. At startup, hyperglass creates a new "UI build", which is a static export of the site and includes some elements of the [configuration](parameters).
|
||||
|
||||
It is recommended to run an initial UI build after running the setup wizard, so that you can verify that the installation is working prior to diving into configuration.
|
||||
|
||||
```shell-session
|
||||
$ hyperglass build-ui
|
||||
✅ Completed UI build in production mode
|
||||
```
|
||||
|
||||
The UI build will run automatically any time the hyperglass configuration or version changes.
|
||||
|
|
|
|||
|
|
@ -12,6 +12,27 @@ import MiniNote from "../../src/components/MiniNote";
|
|||
import Code from "../../src/components/JSXCode";
|
||||
import PageLink from "../../src/components/PageLink";
|
||||
|
||||
## Build
|
||||
|
||||
hyperglass is build with [NextJS](https://nextjs.org/), a [React](https://reactjs.org/)-based UI framework that supports server-side rendering and static exporting, which contribute to hyperglass's speed and SEO-friendliness. At startup, hyperglass creates a new "UI build", which is a static export of the site and includes some elements of the [configuration](parameters).
|
||||
|
||||
This UI build process can be run manually via the hyperglass CLI:
|
||||
|
||||
```shell-session
|
||||
$ hyperglass build-ui
|
||||
✅ Completed UI build in production mode
|
||||
```
|
||||
|
||||
Or with the `--build-ui` CLI flag on startup:
|
||||
|
||||
```shell-session
|
||||
$ hyperglass start --build-ui
|
||||
```
|
||||
|
||||
The UI build will run automatically any time the hyperglass configuration or version changes.
|
||||
|
||||
## Sections
|
||||
|
||||
<div class="table--full-width" />
|
||||
|
||||
The `web` subsection contains multiple subsections of its own, should you wish to customize various aspects of the UI:
|
||||
|
|
@ -28,7 +49,7 @@ The `web` subsection contains multiple subsections of its own, should you wish t
|
|||
| `text` | Text, title, & names | <PageLink to="text">➡️</PageLink> |
|
||||
| `theme` | Colors & Fonts | <PageLink to="theme">➡️</PageLink> |
|
||||
|
||||
## `credit`
|
||||
### `credit`
|
||||
|
||||
| Parameter | Type | Default | Description |
|
||||
| :-------- | :-----: | :-----: | :--------------------------------------------------------------------------------------- |
|
||||
|
|
@ -38,13 +59,13 @@ The `web` subsection contains multiple subsections of its own, should you wish t
|
|||
If your organization's policy allows, and you don't mind, I request that you keep `credit` enabled. Remember: my goal for this project is get more networks to use looking glasses to make all of our lives easier. Because it's primarily other network operators who will use this tool to begin with, I'd love for any operators that use your looking glass to know where they can get their own.
|
||||
:::
|
||||
|
||||
## `dns_provider`
|
||||
### `dns_provider`
|
||||
|
||||
| Parameter | Type | Default | Description |
|
||||
| :-------- | :----: | :------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `name` | String | `'cloudflare'` | DNS over HTTPS provider for in-browser DNS resolution. Cloudflare & Google supported. <MiniNote>Must be <Code>cloudflare</Code> or <Code>google</Code></MiniNote> |
|
||||
|
||||
## `external_link`
|
||||
### `external_link`
|
||||
|
||||
| Parameter | Type | Default | Description |
|
||||
| :-------- | :-----: | :---------------------------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
|
|
@ -52,7 +73,7 @@ If your organization's policy allows, and you don't mind, I request that you kee
|
|||
| `title` | String | `'PeeringDB'` | Link title/label |
|
||||
| `url` | String | `'https://www.peeringdb.com/asn/{primary_asn}'` | Target URL. `{primary_asn}` will be replaced with the `primary_asn` value from <Link to="/docs/configuration#global-settings">Global Settings</Link> |
|
||||
|
||||
## `greeting`
|
||||
### `greeting`
|
||||
|
||||
| Parameter | Type | Default | Description |
|
||||
| :--------- | :-----: | :----------- | :------------------------------------------------------------------------------------------- |
|
||||
|
|
@ -62,7 +83,7 @@ If your organization's policy allows, and you don't mind, I request that you kee
|
|||
| `button` | String | `'Continue'` | Button text. |
|
||||
| `required` | Boolean | `false` | If `true` the user must click the button in order to submit a query. |
|
||||
|
||||
## `opengraph`
|
||||
### `opengraph`
|
||||
|
||||
If you're not familiar with [OpenGraph](https://ogp.me/), it's the thing that generates the pretty pictures, titles, and descriptions for links when you post them to sites/tools such as Facebook, Twitter, Slack, etc.
|
||||
|
||||
|
|
@ -75,7 +96,7 @@ By default, [this Opengraph image](/opengraph.jpg) is set. If you define one wit
|
|||
| :-------- | :----: | :---------------------- |
|
||||
| `image` | String | Path to opengraph image |
|
||||
|
||||
## `terms`
|
||||
### `terms`
|
||||
|
||||
| Parameter | Type | Default | Description |
|
||||
| :-------- | :-----: | :-------- | :-------------------------------------------------------------------------------------------- |
|
||||
|
|
|
|||
|
|
@ -230,6 +230,8 @@ def setup(unattended):
|
|||
write_to_file(systemd_file, systemd)
|
||||
install_systemd(install_path)
|
||||
|
||||
build_ui()
|
||||
|
||||
|
||||
@hg.command(
|
||||
"system-info",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue