e3-603: add pre commit to e3.pages
Pre-commit has been added giving the following checks (which are the defaults generated by pre-commit sample-config
:
- trailing whitespace
- end of file checker
- yaml syntax checker
- large file commit preventer
Additionally, a Markdown linter has been added (https://github.com/markdownlint/markdownlint)
Most of the changes in this MR are to update the .md
files to pass the linter checks. In general, I would not focus too much on the changes to the Markdown files. Most changes to these files are related to line length, and adding in extra lines around lists, code blocks, and headers.
A style file for the Markdown linter is included (see https://gitlab.esss.lu.se/e3/e3.pages.esss.lu.se/-/blob/e3-603_add_pre-commit/.mdl_style.rb), which allows customisation of the rules that are applied. Comments are included in this file to define why each rule has been customised or excluded.
I have checked the sphinx build of the Markdown files, and things look OK.