DOCS: Add page for how to maintain docs (#1780)

This commit is contained in:
Tom Limoncelli 2022-10-28 15:14:28 -04:00 committed by GitHub
parent fd42485d7d
commit ffdb4b6271
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 55 additions and 4 deletions

View file

@ -184,6 +184,11 @@ 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.

43
docs/documentation.md Normal file
View 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.
```

View file

@ -11,16 +11,16 @@ title: Getting Started
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.
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
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).
@ -51,7 +51,7 @@ simple tests anything will do.
Create a subdirectory called `zones` in the same directory as the
configuration files. (`mkdir zones`). `zones` is where the BIND
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`

View file

@ -207,6 +207,9 @@ title: DNSControl
<li>
<a href="{{site.github.url}}/release-engineering">Release Engineering</a>: How to build and ship a release
</li>
<li>
<a href="{{site.github.url}}/documentation">Edit Documentation</a>: How to edit these docs
</li>
<li>
<a href="{{site.github.url}}/byo-secrets">Bring-Your-Own-Secrets</a>: Automate tests
</li>