Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(docs): add markdownlint and mkdocs CI checks #1556

Merged
merged 3 commits into from Apr 30, 2024

Conversation

jnussbaum
Copy link
Contributor

check every PR if the docs comply with mkdocs and markdownlint

@jnussbaum jnussbaum self-assigned this Apr 19, 2024
@jnussbaum jnussbaum changed the title tests(docs): add markdownlint and mkdocs CI checks test(docs): add markdownlint and mkdocs CI checks Apr 19, 2024
.PHONY: docs-publish
docs-publish: ## build and publish docs to github Pages
mkdocs gh-deploy

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't publish the docs of DSP-APP separately any more. So this command isn't used any more.

.PHONY: docs-build
docs-build: ## build docs into the local 'site' folder
mkdocs build
mkdocs build --strict
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --strict flag is necessary, so that warnings are not silently ignored. Often, those warnings later create problems when I want to publish the docs to docs.dasch.swiss. So it is better to catch them early, and let the CI fail if problematic markdown files are checked in.

.PHONY: docs-lint
docs-lint: ## runs the markdownlint linter on the docs
docker run -v $$(pwd):/workdir ghcr.io/igorshubovych/markdownlint-cli:latest --config .markdownlint.json -i docs/contribution/release-notes.md -i docs/index.md --disable MD033 -- "docs/**/*.md"

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This runs markdownlint, which check the markdownfiles for syntax errors. These syntax errors sometimes break the layout on docs.dasch.swiss. So it's better to catch them early, and prevent checking in malformed files.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file is empty, and is not referenced in the documentation. So it doesn't make sense to leave it here.

@@ -2,7 +2,7 @@

## Your user profile and projects

To change your personal information as well as your default language used by the interface, you can edit your profile by clicking *Edit my profile*. Currently, the avatar image comes from gravatar.com (go on their <a href="http://en.gravatar.com/" target="_blank">website</a> to register if you want your customized user photo).
To change your personal information as well as your default language used by the interface, you can edit your profile by clicking *Edit my profile*. Currently, the avatar image comes from gravatar.com (go on their [website](http://en.gravatar.com/) to register if you want your customized user photo).
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

markdown-style links are preferred over HTML-syntax

@jnussbaum jnussbaum merged commit 9c32ea1 into main Apr 30, 2024
13 checks passed
@jnussbaum jnussbaum deleted the wip/add-markdownlint-to-ci branch April 30, 2024 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants