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

View File

@ -382,7 +382,7 @@ sharedCache.put("x", "y")
::: :::
::: tab Nashorn JS ::: tab Nashorn&nbsp;JS
```js ```js
scriptExtension.importPreset("cache") scriptExtension.importPreset("cache")
@ -392,7 +392,7 @@ var valueX = sharedCache.get("x")
::: :::
::: tab JSScripting ::: tab JS&nbsp;Scripting
```js ```js
var { sharedCache, privateCache } = require('@runtime/cache') 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: 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. - --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. - --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. - --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 #### 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: System-based triggers are provided as described in the table below:
| Trigger | Description | | 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 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. | | 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. You may wish to use the 'System started' trigger to initialize values at startup if they are not already set.