Touching up more mkdocs details

This commit is contained in:
Dan Buch 2022-05-08 20:49:08 -04:00
parent 8da1afc62b
commit c468566272
Signed by: meatballhat
GPG Key ID: A12F782281063434
8 changed files with 58 additions and 7 deletions

View File

@ -92,3 +92,17 @@ jobs:
run: | run: |
git diff --exit-code git diff --exit-code
git diff --cached --exit-code git diff --cached --exit-code
publish:
if: startswith(github.ref, 'refs/tags/')
name: publish
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Publish Docs
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.MKDOCS_PUBLISH_GITHUB_TOKEN }}
REQUIREMENTS: mkdocs-requirements.txt

2
.gitignore vendored
View File

@ -1,10 +1,10 @@
*.coverprofile *.coverprofile
*.orig *.orig
node_modules/
vendor vendor
.idea .idea
internal/*/built-example internal/*/built-example
coverage.txt coverage.txt
/.local/ /.local/
/site/
*.exe *.exe

View File

@ -30,3 +30,15 @@ gfmrun:
.PHONY: toc .PHONY: toc
toc: toc:
go run internal/build/build.go toc docs/v2/manual.md go run internal/build/build.go toc docs/v2/manual.md
.PHONY: docs
docs:
mkdocs build
.PHONY: docs-deps
docs-deps:
pip install -r mkdocs-requirements.txt
.PHONY: serve-docs
serve-docs:
mkdocs serve

1
docs/CNAME Normal file
View File

@ -0,0 +1 @@
cli.urfave.org

1
docs/CODE_OF_CONDUCT.md Symbolic link
View File

@ -0,0 +1 @@
../CODE_OF_CONDUCT.md

View File

@ -98,6 +98,28 @@ line help system which may be consulted for further information, e.g.:
go run internal/genflags/cmd/genflags/main.go --help go run internal/genflags/cmd/genflags/main.go --help
``` ```
#### docs output
The documentation in the `docs` directory is automatically built via `mkdocs` into a
static site and published when releases are pushed (see [RELEASING](./RELEASING/)). There
is no strict requirement to build the documentation when developing locally, but the
following `make` targets may be used if desired:
```sh
# install documentation dependencies with `pip`
make docs-deps
```
```sh
# build the static site in `./site`
make docs
```
```sh
# start an mkdocs development server
make serve-docs
```
### pull requests ### pull requests
Please feel free to open a pull request to fix a bug or add a feature. The @urfave/cli Please feel free to open a pull request to fix a bug or add a feature. The @urfave/cli

View File

@ -16,5 +16,6 @@ These are the guides for each major supported version:
In addition to the version-specific guides, these other documents are available: In addition to the version-specific guides, these other documents are available:
- [`CONTRIBUTING`](./CONTRIBUTING/) - [CONTRIBUTING](./CONTRIBUTING/)
- [`RELEASING`](./RELEASING/) - [CODE OF CONDUCT](./CODE_OF_CONDUCT/)
- [RELEASING](./RELEASING/)

View File

@ -1,4 +1,4 @@
mkdocs mkdocs~=1.3
mkdocs-material mkdocs-material~=8.2
mkdocs-git-revision-date-localized-plugin mkdocs-git-revision-date-localized-plugin~=1.0
pygments pygments~=2.12