forked from espressif/esp-modbus
fix component documentation
This commit is contained in:
@@ -194,7 +194,7 @@ build_docs:
|
|||||||
script:
|
script:
|
||||||
- cd docs
|
- cd docs
|
||||||
- pip install -r requirements.txt
|
- pip install -r requirements.txt
|
||||||
- build-docs -l en -t esp32
|
- ./generate_docs
|
||||||
|
|
||||||
.deploy_docs_template:
|
.deploy_docs_template:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
|
7
docs/_static/modbus_docs_versions.js
vendored
7
docs/_static/modbus_docs_versions.js
vendored
@@ -1,11 +1,6 @@
|
|||||||
var DOCUMENTATION_VERSIONS = {
|
var DOCUMENTATION_VERSIONS = {
|
||||||
DEFAULTS: { has_targets: true,
|
|
||||||
supported_targets: [ "esp32", "esp32s2", "esp32s3", "esp32c2", "esp32c3", "esp32c6", "esp32h2" ]
|
|
||||||
},
|
|
||||||
VERSIONS: [
|
VERSIONS: [
|
||||||
{ name: "latest" },
|
{ name: "latest", has_targets: true, supported_targets: [ "esp32", "esp32s2", "esp32s3", "esp32c2", "esp32c3", "esp32c6", "esp32h2" ] },
|
||||||
{ name: "v1.0.10", old:false },
|
|
||||||
{ name: "v1.0.0", old:true }
|
|
||||||
],
|
],
|
||||||
IDF_TARGETS: [
|
IDF_TARGETS: [
|
||||||
{ text: "ESP32", value: "esp32"},
|
{ text: "ESP32", value: "esp32"},
|
||||||
|
@@ -29,5 +29,5 @@ html_static_path = ['../_static']
|
|||||||
project_slug = 'esp-modbus'
|
project_slug = 'esp-modbus'
|
||||||
versions_url = './_static/modbus_docs_versions.js'
|
versions_url = './_static/modbus_docs_versions.js'
|
||||||
|
|
||||||
idf_targets = [ 'esp32', 'esp32s2', 'esp32s3', 'esp32c2', 'esp32c3', 'esp32c6', 'esp32h2' ]
|
idf_targets = [ 'esp32' ]
|
||||||
languages = ['en']
|
languages = ['en']
|
||||||
|
27
docs/generate_docs
Executable file
27
docs/generate_docs
Executable file
@@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
rm -rf docs
|
||||||
|
build-docs --target esp32 --language en
|
||||||
|
|
||||||
|
# Modifes target field of html files
|
||||||
|
ELEMENT="<script type='text/javascript'>
|
||||||
|
window.onload =(function() {
|
||||||
|
var myAnchor = document.getElementById('target-select');
|
||||||
|
var mySpan = document.createElement('input');
|
||||||
|
mySpan.style.float = 'left';
|
||||||
|
mySpan.setAttribute('type', 'text');
|
||||||
|
mySpan.setAttribute('maxLength', '10');
|
||||||
|
mySpan.value = 'all targets';
|
||||||
|
mySpan.setAttribute('disabled', true);
|
||||||
|
myAnchor.parentNode.replaceChild(mySpan, myAnchor);
|
||||||
|
})();
|
||||||
|
</script>"
|
||||||
|
|
||||||
|
FILES=$(find . -path "*/_build/en/esp32/html/*.html")
|
||||||
|
|
||||||
|
for FILE in ${FILES}
|
||||||
|
do
|
||||||
|
echo ${ELEMENT} >> "${FILE}"
|
||||||
|
done
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user