mirror of
https://github.com/StackExchange/dnscontrol.git
synced 2025-11-07 06:55:56 +08:00
DOCS: Add page for how to maintain docs (#1780)
This commit is contained in:
parent
fd42485d7d
commit
ffdb4b6271
4 changed files with 55 additions and 4 deletions
|
|
@ -184,6 +184,11 @@ The documentation can be viewed via Docker:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd docs
|
cd docs
|
||||||
|
./runDocker.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
FYI: Alternative Docker command:
|
||||||
|
```bash
|
||||||
docker run --rm -it --volume="$PWD:/srv/jekyll" --volume="$PWD/vendor/bundle:/usr/local/bundle" --env JEKYLL_ENV=production jekyll/jekyll:3.8 jekyll build -V
|
docker run --rm -it --volume="$PWD:/srv/jekyll" --volume="$PWD/vendor/bundle:/usr/local/bundle" --env JEKYLL_ENV=production jekyll/jekyll:3.8 jekyll build -V
|
||||||
# Open docs/_site/index.html in your web browser to see the results.
|
# Open docs/_site/index.html in your web browser to see the results.
|
||||||
# (Note: The preview isn't perfect. Links that use the site.github.url variable won't work.
|
# (Note: The preview isn't perfect. Links that use the site.github.url variable won't work.
|
||||||
|
|
|
||||||
43
docs/documentation.md
Normal file
43
docs/documentation.md
Normal file
|
|
@ -0,0 +1,43 @@
|
||||||
|
---
|
||||||
|
layout: default
|
||||||
|
title: How to edit the documentation
|
||||||
|
---
|
||||||
|
|
||||||
|
# Working with the docs
|
||||||
|
|
||||||
|
The website is a static website generated by Jekyll.
|
||||||
|
|
||||||
|
The website is generated from the files in `$GIT/dnscontrol/docs`. If a file
|
||||||
|
has a `.md` extension, it will be turned into an HTML file. Otherwise it is
|
||||||
|
copied verbatium.
|
||||||
|
|
||||||
|
# Directory Hierarchy
|
||||||
|
|
||||||
|
* `docs`: The root directory. index.md is the homepage.
|
||||||
|
* `docs/_includes`: Functions and templates.
|
||||||
|
* `docs/css`: CSS
|
||||||
|
* `docs/_functions/record`: Things that augment a record.
|
||||||
|
* `docs/_functions/domain`: Things inside a `D()`
|
||||||
|
* `docs/_functions/global`: Features at the global (file) level.
|
||||||
|
* `docs/_layouts`: Main layout
|
||||||
|
* `docs/public`: Static content
|
||||||
|
* `docs/_site`: The generated site (not in Git)
|
||||||
|
* `docs/assets`: Static files
|
||||||
|
* `docs/flattener`: The SPF flatter
|
||||||
|
|
||||||
|
# How to preview
|
||||||
|
|
||||||
|
The documentation can be viewed via Docker:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd docs
|
||||||
|
./runDocker.sh
|
||||||
|
```
|
||||||
|
|
||||||
|
FYI: Alternative Docker command:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run --rm -it --volume="$PWD:/srv/jekyll" --volume="$PWD/vendor/bundle:/ usr/local/bundle" --env JEKYLL_ENV=production jekyll/jekyll:3.8 jekyll build -V
|
||||||
|
# Open docs/_site/index.html in your web browser to see the results.
|
||||||
|
# (Note: The preview isn't perfect. Links that use the site.github.url variable won't work.
|
||||||
|
```
|
||||||
|
|
@ -11,16 +11,16 @@ title: Getting Started
|
||||||
|
|
||||||
DNSControl can be built with Go version 1.18 or higher.
|
DNSControl can be built with Go version 1.18 or higher.
|
||||||
|
|
||||||
The `go get` command will download the source, compile it, and
|
The `go install` command will download the source, compile it, and
|
||||||
install `dnscontrol` in your `$GOBIN` directory.
|
install `dnscontrol` in your `$GOBIN` directory.
|
||||||
|
|
||||||
To install, simply run
|
To install, simply run
|
||||||
|
|
||||||
GO111MODULE=on go get github.com/StackExchange/dnscontrol/v3
|
go install github.com/StackExchange/dnscontrol/v3@latest
|
||||||
|
|
||||||
To download the source
|
To download the source
|
||||||
|
|
||||||
git clone github.com/StackExchange/dnscontrol
|
git clone https://github.com/StackExchange/dnscontrol
|
||||||
|
|
||||||
If these don't work, more info is in [#805](https://github.com/StackExchange/dnscontrol/issues/805).
|
If these don't work, more info is in [#805](https://github.com/StackExchange/dnscontrol/issues/805).
|
||||||
|
|
||||||
|
|
@ -51,7 +51,7 @@ simple tests anything will do.
|
||||||
Create a subdirectory called `zones` in the same directory as the
|
Create a subdirectory called `zones` in the same directory as the
|
||||||
configuration files. (`mkdir zones`). `zones` is where the BIND
|
configuration files. (`mkdir zones`). `zones` is where the BIND
|
||||||
provider writes the zonefiles it creates. Even if you don't
|
provider writes the zonefiles it creates. Even if you don't
|
||||||
use BIND, it is useful for testing.
|
use BIND for DNS service, it is useful for testing.
|
||||||
|
|
||||||
|
|
||||||
## 3. Create the initial `dnsconfig.js`
|
## 3. Create the initial `dnsconfig.js`
|
||||||
|
|
|
||||||
|
|
@ -207,6 +207,9 @@ title: DNSControl
|
||||||
<li>
|
<li>
|
||||||
<a href="{{site.github.url}}/release-engineering">Release Engineering</a>: How to build and ship a release
|
<a href="{{site.github.url}}/release-engineering">Release Engineering</a>: How to build and ship a release
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="{{site.github.url}}/documentation">Edit Documentation</a>: How to edit these docs
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="{{site.github.url}}/byo-secrets">Bring-Your-Own-Secrets</a>: Automate tests
|
<a href="{{site.github.url}}/byo-secrets">Bring-Your-Own-Secrets</a>: Automate tests
|
||||||
</li>
|
</li>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue