-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* removed empty pages * build pipeline changed * ci pipeline changed * added sphinx docs
- Loading branch information
Showing
9 changed files
with
110 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
this file for empty directory tracking |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Travis CI | ||
|
||
Example integration can take next steps and looks like code below: | ||
|
||
<h3>Handling Static Files</h3> | ||
|
||
If tool, you using for static site generation doesn't support serving files, you can pass this task to deadlinks using `internal` keyword and `--root` option. | ||
|
||
```yaml | ||
|
||
language: python | ||
python: 3.8 | ||
|
||
# Install step will install dependencies (sphinx) and deadlinks | ||
install: | ||
- pip install -r requirements.txt | ||
- pip install deadlinks | ||
|
||
# Build step will create artifacts (in html directory) and deadlinks | ||
# will check directory `html` and fail if failed urls found. | ||
script: | ||
- sphinx-build docs html -qW --keep-going | ||
- deadlinks internal -R html --no-progress --no-colors --fiff | ||
|
||
# You can deploy artifacts to github pages if pipeline passes. | ||
deploy: | ||
provider: pages | ||
skip_cleanup: true | ||
github_token: $GITHUB_TOKEN | ||
local_dir: html | ||
on: | ||
branch: master | ||
``` | ||
Read more about `sphinx` at [Static Site Generators](../static-site-generators#sphinx) page. | ||
|
||
<h3>Serving Files</h3> | ||
|
||
If your tool can serve html files, just run serving in background | ||
|
||
```yaml | ||
language: python | ||
python: 3.8 | ||
# Install step will install dependencies (mkdocs) and deadlinks | ||
install: | ||
- pip install -r requirements.txt | ||
- pip install deadlinks | ||
# We running build for static files first, and then running it again in the `serve` | ||
# mode, `deadlinks` is checking web address on which documentation served. | ||
script: | ||
- mkdocs build --strict | ||
- mkdocs serve --dirtyreload --dev-addr 127.0.0.1:8080 & | ||
- deadlinks http://127.0.0.1:8080 -n10 -r3 --no-progress --no-colors --fiff | ||
|
||
``` | ||
Read more about `mkdocs` at [Static Site Generators](../static-site-generators#mkdocs) page. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# Static Site Generators | ||
|
||
There are [number of options](https://www.staticgen.com/) you can use for static website or documentation generation, and we honestly can't recommend any particular. However it's important to understand that `deadlinks` itself designated to eliminate just one issue with documentation - dead or broken links, static site generator you using, can have additional features that will improve your CI process. It's nice to know `what` tools can do `what` and integrate their features into CI. | ||
|
||
Static site generator can: | ||
* Show information about missing links or not included files. | ||
* Describe markup errors found in source files | ||
* Check for the issues with external or internal links too. | ||
|
||
This is incomplete list of known CI features you can integrate in your pipeline. | ||
|
||
|
||
## [Sphinx](https://www.sphinx-doc.org/) | ||
|
||
Sphinx itself, doesn't support files serving, so we will always rebuild files before testing, however it checks included, missing links, and generate corresponding warnings. You also can use `sphinx` via `setup.py` | ||
|
||
```bash | ||
# -q will limit output only to warnings | ||
# -W will turn warnings into errors | ||
# --keep-going will show all found errors, not just first one. | ||
sphinx-build docs html -qW --keep-going | ||
|
||
# same effect if used via setup.py | ||
python3 setup.py build_sphinx -c docs --build-dir build -qW --keep-going | ||
``` | ||
|
||
## [MkDocs](https://www.mkdocs.org/) | ||
|
||
MkDocs is quite nice and configurable static docs generator, which can serve files and exit on warnings (`--strict` option). | ||
|
||
```bash | ||
# Serve files at 127.0.0.1:8080 | ||
mkdocs serve --strict --dirtyreload --dev-addr 127.0.0.1:8080 | ||
|
||
# Just build files | ||
mkdocs build --strict | ||
``` |