Skip to content

Commit

Permalink
Fix broken formatting in docs (#2435)
Browse files Browse the repository at this point in the history
* Fix headings of tips and notes

Closes #2434

* Fix scripts to run mkdocs locally
  • Loading branch information
paul-dingemans committed Dec 13, 2023
1 parent 7c653cf commit b37c3a6
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
6 changes: 3 additions & 3 deletions documentation/release-latest/docs/install/cli.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
!!! note Command Line usage
!!! note "Command Line usage"
If you don't plan to use `ktlint`'s command line interface then you can skip this section.

## Download and verification
Expand Down Expand Up @@ -156,7 +156,7 @@ Use command below, to specify a default `editorconfig`. In case a property is no
ktlint --editorconfig=/path/to/.editorconfig
```

!!! warning "Overrides '.editorconfig' in project directory" in KtLint 0.46 and older
!!! warning "Overrides '.editorconfig' in project directory" in KtLint 0.46 and older"
When specifying this option using ktlint 0.46 or older, all `.editorconfig` files in the project directory are being ignored. Starting from KtLint 0.47 the properties in this file are used as fallback.

### Stdin && stdout
Expand All @@ -173,7 +173,7 @@ When combined with the `--format` option, the formatted code is written to `stdo
ktlint --stdin -F
```

!!! tip Suppress logging and error output
!!! tip "Suppress logging and error output"
Logging output printed to `stdout` can be suppressed by setting `--log-level=none` (see [logging](#logging)).
Output printed to `stderr` can be suppressed in different ways. To ignore all error output, add `2> /dev/null` to the end of the command line. Otherwise, specify a [reporter](#violation-reporting) to write the error output to a file.

Expand Down
5 changes: 3 additions & 2 deletions documentation/release-latest/serve-docs-locally.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
echo "Serving docs from directory '$(basename "${PWD##*/}")'"
echo ""

mkdocs serve
python3 -m mkdocs serve
if [[ $? -ne 0 ]]; then
echo "Invalid command. Please ensure that 'mkdocs' is installed."
echo " - If needed install python3"
echo " - If needed run 'pip install mkdocs'"
echo " - If needed run 'pip3 install mkdocs'"
echo " - If needed run 'pip3 install mkdocs-material'"
echo "Or run 'docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material'"
fi
6 changes: 3 additions & 3 deletions documentation/snapshot/docs/install/cli.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
!!! note Command Line usage
!!! note "Command Line usage"
If you don't plan to use `ktlint`'s command line interface then you can skip this section.

## Download and verification
Expand Down Expand Up @@ -156,7 +156,7 @@ Use command below, to specify a default `editorconfig`. In case a property is no
ktlint --editorconfig=/path/to/.editorconfig
```

!!! warning "Overrides '.editorconfig' in project directory" in KtLint 0.46 and older
!!! warning "Overrides '.editorconfig' in project directory" in KtLint 0.46 and older"
When specifying this option using ktlint 0.46 or older, all `.editorconfig` files in the project directory are being ignored. Starting from KtLint 0.47 the properties in this file are used as fallback.

### Stdin && stdout
Expand All @@ -173,7 +173,7 @@ When combined with the `--format` option, the formatted code is written to `stdo
ktlint --stdin -F
```

!!! tip Suppress logging and error output
!!! tip "Suppress logging and error output"
Logging output printed to `stdout` can be suppressed by setting `--log-level=none` (see [logging](#logging)).
Output printed to `stderr` can be suppressed in different ways. To ignore all error output, add `2> /dev/null` to the end of the command line. Otherwise, specify a [reporter](#violation-reporting) to write the error output to a file.

Expand Down
5 changes: 3 additions & 2 deletions documentation/snapshot/serve-docs-locally.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@
echo "Serving docs from directory '$(basename "${PWD##*/}")'"
echo ""

mkdocs serve
python3 -m mkdocs serve
if [[ $? -ne 0 ]]; then
echo "Invalid command. Please ensure that 'mkdocs' is installed."
echo " - If needed install python3"
echo " - If needed run 'pip install mkdocs'"
echo " - If needed run 'pip3 install mkdocs'"
echo " - If needed run 'pip3 install mkdocs-material'"
echo "Or run 'docker run --rm -it -p 8000:8000 -v ${PWD}:/docs squidfunk/mkdocs-material'"
fi

0 comments on commit b37c3a6

Please sign in to comment.