Add Markdown linting (#52)

- Also renames `make vale` to `make check`
- Addresses a part of #15
This commit is contained in:
Niraj Tolia 2022-05-19 10:45:31 -07:00 committed by GitHub
parent 5f7f5736ed
commit b903d962d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 2 deletions

View File

@ -14,7 +14,10 @@ RUN apt-get -y update && apt-get -y install gpg emacs curl \
WORKDIR /usr/src
COPY package.json package-lock.json* ./
RUN npm ci && npm cache clean --force && rm -f package.json package-lock.json*
RUN npm ci \
&& npm install -g markdownlint-cli \
&& npm cache clean --force \
&& rm -f package.json package-lock.json*
ENV PATH /usr/src/node_modules/.bin:$PATH
WORKDIR /usr/src/docs

View File

@ -8,9 +8,11 @@ dev:
-p 3000:3000 \
-v ${PWD}:/usr/src/docs alcion/docs
vale:
check:
docker run --rm \
-v ${PWD}:/usr/src/docs alcion/docs vale --glob='*.md' .
docker run --rm \
-v ${PWD}:/usr/src/docs alcion/docs markdownlint '**/*.md'
shell:
docker run --rm -it \

View File

@ -24,6 +24,14 @@ $ make build
This command generates static content into the `build` directory and can be served using any static contents hosting service.
### Check Docs
```
$ make check
```
This command will lint all Markdown files and check them for style issues.
### Documentation Platform Development