From b903d962d326d28859199fb6438677f32074b432 Mon Sep 17 00:00:00 2001 From: Niraj Tolia Date: Thu, 19 May 2022 10:45:31 -0700 Subject: [PATCH] Add Markdown linting (#52) - Also renames `make vale` to `make check` - Addresses a part of #15 --- docs/Dockerfile | 5 ++++- docs/Makefile | 4 +++- docs/README.md | 8 ++++++++ 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/docs/Dockerfile b/docs/Dockerfile index 9f588238d..577ba67b3 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -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 diff --git a/docs/Makefile b/docs/Makefile index af30bfdc3..3cb25cbed 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -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 \ diff --git a/docs/README.md b/docs/README.md index 1a8eadf29..ed73735bf 100644 --- a/docs/README.md +++ b/docs/README.md @@ -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