Skip to content

Commit

Permalink
Add check for doc links (#81)
Browse files Browse the repository at this point in the history
  • Loading branch information
analog-cbarber committed Sep 11, 2023
1 parent 5916b12 commit fdc81ef
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 4 deletions.
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
RM := rm
RMDIR := rm -rf
DEV_ENV := whl2conda-dev
TOUCH := touch

ifdef OS
# Windows
Expand Down Expand Up @@ -46,6 +47,7 @@ help:
"\n" \
"--- documentation ---\n" \
"doc - build documentation\n" \
"doc-strict - build documentation and check links\n" \
"doc-open - build/open documentation index.html\n" \
"doc-serve - serve documentation in temporary web server\n" \
"doc-serve-all - serve versioned documentation in temporary web server\n" \
Expand Down Expand Up @@ -135,6 +137,12 @@ site/index.html: $(CLI_DOCS) $(MKDOCS_FILE) doc/*.md src/whl2conda/api/*.py

doc: site/index.html

site/.doc-strict: site/index.html
$(CONDA_RUN) linkchecker -f likcheckerrc.ini site
$(TOUCH) $@

doc-strict: site/.doc-strict

doc-serve: $(CLI_DOCS)
$(CONDA_RUN) mkdocs serve -f $(MKDOCS_FILE)

Expand Down
13 changes: 11 additions & 2 deletions doc/install.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,23 @@

## using pip
## Using pip

```bash
pip install whl2conda
```

## using conda
## Using conda

```bash
conda install -c conda-forge whl2conda
```

*whl2conda* does not have a direct runtime dependency on conda, so it
is safe to install in environments other than `base`.

## Prerequisites

It is assumed that you have installed conda, and that it is in the program
path, but it is currently only required for `whl2conda install`. Furthermore,
if you use the `--conda-bld` option, you must have `conda-index` installed
in your base environment (you will already have it if you have `conda-build`).

1 change: 1 addition & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@ dependencies:
- mkdocstrings-python >=1.3,<2.0
- mkdocs-material >9.1
- mkdocstrings-python-xref >=1.5.2,<2.0
- linkchecker >=

7 changes: 7 additions & 0 deletions linkcheckerrc.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# configuration for linkchecker for use on site/
[filtering]
checkextern=1
# ignore URLs that we cannot access without authentication
#ignore=
# https://fonts.gstatic.com
# https://anaconda.org
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ nav:
- License: license.md

# https://squidfunk.github.io/mkdocs-material/setup/changing-the-colors/
extra_css:
- style.css
#extra_css:
# - style.css

theme:
name: material
Expand Down

0 comments on commit fdc81ef

Please sign in to comment.