From 1a15b6c7fc30e9b3860a70b0a7dc19185b880d27 Mon Sep 17 00:00:00 2001 From: Jerome Luckenbach Date: Thu, 3 Nov 2022 18:43:14 +0100 Subject: [PATCH] Improve markdown linting (#1906) * Improve markdownlint configuration. Signed-off-by: Jerome Luckenbach * Apply changes to current linting rules. Signed-off-by: Jerome Luckenbach Signed-off-by: Jerome Luckenbach --- .github/.markdownlint.yaml | 4 + .markdownlint.yaml | 6 + README.md | 16 +-- addons/actions.md | 4 +- addons/io.md | 2 +- administration/bundles.md | 2 +- administration/console.md | 2 +- concepts/audio.md | 20 ++-- configuration/addons.md | 6 +- configuration/blockly/index.md | 14 +-- .../blockly/rules-blockly-before-using.md | 12 +- .../blockly/rules-blockly-date-handling.md | 42 +++---- .../blockly/rules-blockly-ephemeris.md | 12 +- .../blockly/rules-blockly-items-things.md | 28 ++--- .../blockly/rules-blockly-logging.md | 4 +- .../blockly/rules-blockly-notifications.md | 8 +- .../blockly/rules-blockly-persistence.md | 6 +- .../blockly/rules-blockly-run-and-process.md | 20 ++-- .../blockly/rules-blockly-standard-ext.md | 16 +-- .../rules-blockly-timers-and-delays.md | 38 +++--- .../blockly/rules-blockly-value-storage.md | 6 +- .../rules-blockly-voice-and-multimedia.md | 12 +- configuration/editors.md | 2 +- configuration/index.md | 2 +- configuration/items.md | 16 +-- configuration/jsr223.md | 12 +- configuration/rules-dsl.md | 10 +- configuration/rules-ng.md | 4 +- developers/bindings/binding-xml.md | 4 +- developers/bindings/config-xml.md | 4 +- developers/bindings/index.md | 78 ++++++------- developers/bindings/thing-xml.md | 18 +-- developers/contributing.md | 2 +- developers/index.md | 2 +- developers/module-types/index.md | 18 +-- developers/osgi/configadmin.md | 6 +- developers/osgi/equinox.md | 20 ++-- developers/osgi/eventadmin.md | 18 +-- developers/osgi/osgi.md | 30 ++--- developers/osgi/osgids.md | 18 +-- developers/utils/tools.md | 4 +- installation/docker.md | 2 +- installation/index.md | 5 +- installation/linux.md | 6 +- installation/security.md | 110 +++++------------- installation/synology.md | 4 +- installation/windows.md | 2 +- introduction.md | 4 +- settings/aboutpage.md | 1 - tutorials/getting_started/custom_widgets.md | 2 +- tutorials/getting_started/item_widgets.md | 2 +- tutorials/getting_started/model.md | 28 ++--- tutorials/getting_started/persistence.md | 2 +- tutorials/getting_started/rules_advanced.md | 2 +- tutorials/getting_started/rules_blockly.md | 6 +- .../getting_started/rules_introduction.md | 2 +- ui/layout-pages.md | 44 +++---- ui/personal-widgets.md | 2 +- ui/sitemaps.md | 4 +- 59 files changed, 366 insertions(+), 410 deletions(-) create mode 100644 .markdownlint.yaml diff --git a/.github/.markdownlint.yaml b/.github/.markdownlint.yaml index 23f3b22fb..43e6f1605 100644 --- a/.github/.markdownlint.yaml +++ b/.github/.markdownlint.yaml @@ -25,3 +25,7 @@ MD033: false # Code block style MD046: style: fenced + +#Emphasiszis in asterisk +MD049: + style: underscore diff --git a/.markdownlint.yaml b/.markdownlint.yaml new file mode 100644 index 000000000..df4557c54 --- /dev/null +++ b/.markdownlint.yaml @@ -0,0 +1,6 @@ +# Reference workflow file in ".github folder" +# to allow local development and workflow with one configuration + +extends: "./.github/.markdownlint.yaml" + +# Any configuration should be done in the workflow file \ No newline at end of file diff --git a/README.md b/README.md index 63b4990bb..d11f72ec3 100644 --- a/README.md +++ b/README.md @@ -8,9 +8,9 @@ The result is available at [https://openhab.org/docs/](https://www.openhab.org/d ## How it works -In this repo you can find and improve all *general* documentation contents. +In this repo you can find and improve all _general_ documentation contents. In fact that is all you can see in the `main` branch. -There are also other *read-only* branches, which hold external content like the *add-ons* and *concepts* documentation. +There are also other _read-only_ branches, which hold external content like the _add-ons_ and _concepts_ documentation. We will read about them later. ### So I can't improve an add-on article here? @@ -44,7 +44,7 @@ You can read a bit more below about our external resources and how we get them. ### Automatically Generated Parts -Those parts include __all__ add-on documentation files, no matter if they are from the `openhab-core` repo, the `openhab-addons` repo or any special binding repo like *habmin*, *zwave* or the *alexa skill*. +Those parts include __all__ add-on documentation files, no matter if they are from the `openhab-core` repo, the `openhab-addons` repo or any special binding repo like _habmin_, _zwave_ or the _alexa skill_. We are keeping all those files at their original location, because it simply doesn't make sense to keep them here. Imagine you want to do an improvement of the zwave binding and have to update the readme file in a completely different place. @@ -60,8 +60,8 @@ The process below is subject to changes until the openHAB 3.x website become the ### How the documentation build works We have set up our [build server](https://ci.openhab.org/view/Documentation%20(3.x)/) to do the magic automatically. -There are several triggers (mostly time based), which will then *gather the external contents* and move them to our [final](https://github.com/openhab/openhab-docs/tree/final) branch. -You can find this migrated external content in the *final* branch under: +There are several triggers (mostly time based), which will then _gather the external contents_ and move them to our [final](https://github.com/openhab/openhab-docs/tree/final) branch. +You can find this migrated external content in the _final_ branch under: - `_addons_*` - `concepts` @@ -71,14 +71,14 @@ The external content is updated by the following toolchain: - `update-external-resources.sh` → `pom.xml` → `process_addons.groovy` -Everything that gets updated in the *master* branch will be also merged over to the *final* branch automatically. -Afterwards we will redeploy the website with the latest content from the *final* branch at regular intervals. +Everything that gets updated in the _master_ branch will be also merged over to the _final_ branch automatically. +Afterwards we will redeploy the website with the latest content from the _final_ branch at regular intervals. #### Build triggers investigated There are two triggers available currently. The `merge docs` job is triggerd after something has been added to the documentation through this repository. -The `gather external docs` job is started with a **succesful** build of the openhab-distribution. +The `gather external docs` job is started with a __succesful__ build of the openhab-distribution. A succesful disribution build will include all of the latest changes that have been made to external sources like addons. So when a distribution build is succesful, we will trigger the gathering of all external sources. diff --git a/addons/actions.md b/addons/actions.md index 2edb40b3e..4605412ff 100644 --- a/addons/actions.md +++ b/addons/actions.md @@ -177,7 +177,7 @@ The Timer object supports the following methods: - `cancel`: prevents the scheduled timer from executing. Most of the time `cancel` is used used in conjunction with setting the timer handler to `null` as a convenient indicator that some previously defined timer is now finished with. However setting the handler to `null` does not interact with the timer itself. - `isActive`: returns `true` if the timer will be executed as scheduled, i.e. it has not been cancelled or completed. -- `isCancelled`: returns `true` if the timer has been cancelled *before* it completed. +- `isCancelled`: returns `true` if the timer has been cancelled _before_ it completed. - `isRunning`: returns `true` if the code is currently executing (i.e. the timer activated the code but it is not done running). - `hasTerminated`: returns `true` if the timer has been cancelled or the code has run and completed. - `reschedule(AbstractInstant instant)`: reschedules the timer to execute at the new time. If the Timer has terminated this method does nothing. @@ -227,7 +227,7 @@ Notification actions may be placed in Rules to send alerts to mobile devices reg Three different actions are available: - `sendNotification(emailAddress, message)`: Sends a notification to a specific cloud instance user -- `sendBroadcastNotification(message)`: Sends a notification to *all* devices of *all* users +- `sendBroadcastNotification(message)`: Sends a notification to _all_ devices of _all_ users - `sendLogNotification(message)`: Sends a log notification to the `notifications` list at your openHAB Cloud instance. Notifications are NOT sent to any registered devices For each of the three actions, there's another variant accepting an icon name and a severity: diff --git a/addons/io.md b/addons/io.md index 2aedabec7..889ad70df 100644 --- a/addons/io.md +++ b/addons/io.md @@ -7,7 +7,7 @@ title: System Integrations openHAB supports services that enable integration with various technologies that don't fall into other add-on categories. -Most of the systems mentioned below are integrated via a *Misc* add-on, installed e.g. through UI. +Most of the systems mentioned below are integrated via a _Misc_ add-on, installed e.g. through UI. Detailed instructions and requirements may be found in the corresponding documentation pages.