Minor enhancements (#2230)

* Minor doc enhancements

Some findings from Vuepress compilation warnings while working on the website build.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>

* Improve Ruby build script

See https://github.com/openhab/website/pull/445.

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>

---------

Signed-off-by: Florian Hotze <florianh_dev@icloud.com>
pull/2231/head
Florian Hotze 2024-02-09 18:48:07 +01:00 committed by GitHub
parent 9f2c66f461
commit b4fd83501e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 25 additions and 29 deletions

View File

@ -25,8 +25,8 @@ def process_main_docs(docs_source_dir)
process_file("#{docs_source_dir}/concepts", file, "docs/concepts", "#{$esh_repo_root}/concepts/#{file}")
}
puts " -> images and diagrams"
FileUtils.cp_r("#{docs_source_dir}/concepts/images", "docs/concepts/images")
FileUtils.cp_r("#{docs_source_dir}/concepts/diagrams", "docs/concepts/diagrams")
FileUtils.cp_r("#{docs_source_dir}/concepts/images", "docs/concepts")
FileUtils.cp_r("#{docs_source_dir}/concepts/diagrams", "docs/concepts")
else
puts " Skipping non-existing section!"
end
@ -40,7 +40,7 @@ def process_main_docs(docs_source_dir)
process_file("#{docs_source_dir}/installation", file, "docs/installation", "#{$docs_repo_root}/installation/#{file}")
}
puts " -> images"
FileUtils.cp_r("#{docs_source_dir}/installation/images", "docs/installation/images")
FileUtils.cp_r("#{docs_source_dir}/installation/images", "docs/installation")
puts ">>> Migrating the Tutorial section"
@ -50,11 +50,10 @@ def process_main_docs(docs_source_dir)
process_file("#{docs_source_dir}/tutorials/getting_started", file, "docs/tutorial", "#{$docs_repo_root}/tutorials/getting_started/#{file}")
}
puts " -> images"
FileUtils.cp_r("#{docs_source_dir}/tutorials/getting_started/images", "docs/tutorial/images")
FileUtils.cp_r("#{docs_source_dir}/tutorials/getting_started/images", "docs/tutorial")
# FileUtils.cp_r("#{docs_source_dir}/tutorials/images/*", "docs/tutorial/images")
puts ">>> Migrating the Configuration section"
Dir.glob("#{docs_source_dir}/configuration/*.md") { |path|
file = File.basename(path)
@ -77,18 +76,15 @@ def process_main_docs(docs_source_dir)
puts " -> #{file}"
process_file("#{docs_source_dir}/mainui", file, "docs/mainui", "#{$docs_repo_root}/mainui/#{file}")
}
Dir.glob("#{docs_source_dir}/mainui/developer/*.md") { |path|
file = File.basename(path)
puts " -> #{file}"
process_file("#{docs_source_dir}/mainui/developer", file, "docs/mainui/developer", "#{$docs_repo_root}/mainui/developer/#{file}")
}
Dir.glob("#{docs_source_dir}/mainui/settings/*.md") { |path|
file = File.basename(path)
puts " -> #{file}"
process_file("#{docs_source_dir}/mainui/settings", file, "docs/mainui/settings", "#{$docs_repo_root}/mainui/settings/#{file}")
["developer", "settings"].each { |subsection|
Dir.glob("#{docs_source_dir}/mainui/#{subsection}/*.md") { |path|
file = File.basename(path)
puts " -> #{subsection}/#{file}"
process_file("#{docs_source_dir}/mainui/#{subsection}", file, "docs/mainui/#{subsection}", "#{$docs_repo_root}/mainui/#{subsection}/#{file}")
}
}
puts " -> images"
FileUtils.cp_r("#{docs_source_dir}/mainui/images", "docs/mainui/images")
FileUtils.cp_r("#{docs_source_dir}/mainui/images", "docs/mainui")
puts ">>> Migrating the Migration Tutorial section"
@ -118,7 +114,7 @@ def process_main_docs(docs_source_dir)
process_file("#{docs_source_dir}/ui", file, "docs/ui", "#{$docs_repo_root}/ui/#{file}")
}
puts " -> images"
FileUtils.cp_r("#{docs_source_dir}/ui/images", "docs/ui/images")
FileUtils.cp_r("#{docs_source_dir}/ui/images", "docs/ui")
puts ">>> Migrating the Apps section"
@ -138,7 +134,7 @@ def process_main_docs(docs_source_dir)
process_file("#{docs_source_dir}/administration", file, "docs/administration", "#{$docs_repo_root}/administration/#{file}")
}
puts " -> images"
FileUtils.cp_r("#{docs_source_dir}/administration/images", "docs/administration/images")
FileUtils.cp_r("#{docs_source_dir}/administration/images", "docs/administration")
puts ">>> Migrating the Developer section"
@ -156,8 +152,8 @@ def process_main_docs(docs_source_dir)
}
puts " -> images"
FileUtils.cp_r("#{docs_source_dir}/developers/bindings/images", "docs/developer/bindings/images")
FileUtils.cp_r("#{docs_source_dir}/developers/osgi/images", "docs/developer/osgi/images")
FileUtils.cp_r("#{docs_source_dir}/developers/ide/images", "docs/developer/ide/images")
FileUtils.cp_r("#{docs_source_dir}/developers/bindings/images", "docs/developer/bindings")
FileUtils.cp_r("#{docs_source_dir}/developers/osgi/images", "docs/developer/osgi")
FileUtils.cp_r("#{docs_source_dir}/developers/ide/images", "docs/developer/ide")
end

View File

@ -382,7 +382,7 @@ sharedCache.put("x", "y")
:::
::: tab Nashorn JS
::: tab Nashorn&nbsp;JS
```js
scriptExtension.importPreset("cache")
@ -392,7 +392,7 @@ var valueX = sharedCache.get("x")
:::
::: tab JSScripting
::: tab JS&nbsp;Scripting
```js
var { sharedCache, privateCache } = require('@runtime/cache')

View File

@ -370,9 +370,9 @@ Using the 'Listening Melody' in the voice settings, you can configure an acousti
Other interesting options for the dialog initialization are:
- --dialog-group <group name>: You can prevent simultaneous execution of dialogs by assigning them to same group, by default they are assigned the 'default' group.
- --location-item <ItemName>: You can provide an Item as location context for the dialogs, the interpreters can take advantage of these.
- --listening-item <ItemName>: You can configure an Item to be "ON"/"OFF" on recognition start/stop, useful for example to trigger a rule that mutes the surrounding devices.
- --dialog-group `<group name>`: You can prevent simultaneous execution of dialogs by assigning them to same group, by default they are assigned the 'default' group.
- --location-item `<ItemName>`: You can provide an Item as location context for the dialogs, the interpreters can take advantage of these.
- --listening-item `<ItemName>`: You can configure an Item to be "ON"/"OFF" on recognition start/stop, useful for example to trigger a rule that mutes the surrounding devices.
#### Actions

View File

@ -194,10 +194,10 @@ When using an item and you want to ignore the date-portion of that item the `tim
System-based triggers are provided as described in the table below:
| Trigger | Description |
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| System started | `System started` is triggered upon openHAB startup. In openHAB version 2, `System started` is also triggered after the rule file containing the System started trigger is modified, or after item(s) are modified in a .items file. |
| System reached start level <level> | `System reached start level <level>` is triggered when openHAB reaches a specific start level. A list of possible start levels is available below. Please note that only levels 40 and higher are useful as the rule engine needs to be ready first. |
| Trigger | Description |
|--------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| System started | `System started` is triggered upon openHAB startup. In openHAB version 2, `System started` is also triggered after the rule file containing the System started trigger is modified, or after item(s) are modified in a .items file. |
| System reached start level `<level>` | `System reached start level <level>` is triggered when openHAB reaches a specific start level. A list of possible start levels is available below. Please note that only levels 40 and higher are useful as the rule engine needs to be ready first. |
You may wish to use the 'System started' trigger to initialize values at startup if they are not already set.