style tables with bootstrap table styles
as per https://willschenk.com/articles/2020/styling_tables_with_hugo/
This commit is contained in:
parent
cb95bb6df8
commit
876a3308d2
@ -50,7 +50,12 @@
|
||||
<li>A service notifies other services about state changes by sending them signal <code>SIGUSR1</code>.</li>
|
||||
</ul>
|
||||
<h2 id="configuration-files">Configuration files</h2>
|
||||
<table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>File</th>
|
||||
@ -76,8 +81,15 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<h2 id="state-files">State files</h2>
|
||||
<table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>File</th>
|
||||
@ -113,8 +125,15 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<h2 id="available-ports">Available ports</h2>
|
||||
<table>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Port</th>
|
||||
@ -160,6 +179,8 @@
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
||||
<p>Here’s an example of <code>cmd/diagd</code> output:</p>
|
||||
<p><img src="https://github.com/rtr7/router7/raw/master/2018-07-14-diagd.png"
|
||||
width="800" alt="diagd output"></p>
|
||||
|
@ -18,23 +18,28 @@ The individual services can be found in [github.com/rtr7/router7/cmd](https://pk
|
||||
|
||||
## Configuration files
|
||||
|
||||
{{<table "table table-striped table-bordered">}}
|
||||
| File | Consumer(s) | Purpose |
|
||||
|---|---|---|
|
||||
| `/perm/interfaces.json` | `netconfigd` | Set IP/MAC addresses of `uplink0` and `lan0` |
|
||||
| `/perm/portforwardings.json` | `netconfigd` | Configure nftables port forwarding rules |
|
||||
| `/perm/dhcp6/duid` | `dhcp6` | Set DHCP Unique Identifier (DUID) for obtaining static leases |
|
||||
{{</table>}}
|
||||
|
||||
## State files
|
||||
|
||||
{{<table "table table-striped table-bordered">}}
|
||||
| File | Producer | Consumer(s) | Purpose |
|
||||
|---|---|---|---|
|
||||
| `/perm/dhcp4/wire/ack` | `dhcp4` | `dhcp4` | last DHCPACK packet for renewals across restarts |
|
||||
| `/perm/dhcp4/wire/lease.json` | `dhcp4` | `netconfigd` | Obtained DHCPv4 lease |
|
||||
| `/perm/dhcp6/wire/lease.json` | `dhcp6` | `netconfigd`, `radvd` | Obtained DHCPv6 lease |
|
||||
| `/perm/dhcp4d/leases.json` | `dhcp4d` | `dhcp4d`, `dnsd` | DHCPv4 leases handed out (including hostnames) |
|
||||
{{</table>}}
|
||||
|
||||
## Available ports
|
||||
|
||||
{{<table "table table-striped table-bordered">}}
|
||||
| Port | Purpose |
|
||||
|---|---|
|
||||
| `<public>:8053` | `dnsd` metrics (forwarded requests)
|
||||
@ -46,6 +51,7 @@ The individual services can be found in [github.com/rtr7/router7/cmd](https://pk
|
||||
| `<private>:8077` | `backupd` (serve backup.tar.gz)
|
||||
| `<private>:7733` | `diagd` (perform diagnostics)
|
||||
| `<private>:5022` | `captured` (serve captured packets)
|
||||
{{</table>}}
|
||||
|
||||
Here’s an example of `cmd/diagd` output:
|
||||
|
||||
|
6
website/layouts/shortcodes/table.html
Normal file
6
website/layouts/shortcodes/table.html
Normal file
@ -0,0 +1,6 @@
|
||||
{{ $htmlTable := .Inner | markdownify }}
|
||||
{{ $class := .Get 0 }}
|
||||
{{ $old := "<table>" }}
|
||||
{{ $new := printf "<table class=\"%s\">" $class }}
|
||||
{{ $htmlTable := replace $htmlTable $old $new }}
|
||||
{{ $htmlTable | safeHTML }}
|
Loading…
x
Reference in New Issue
Block a user