build-docs --target esp32 --language en

cp -rf _build/en/esp32/html .
rm -rf _build __pycache__

# Modifes some version and target fields of index.html
echo "<script type="text/javascript">
window.onload =(function() {
    var myAnchor = document.getElementById('version-select');
    var mySpan = document.createElement('input');
    mySpan.setAttribute('type', 'text');
    mySpan.setAttribute('maxLength', '10');
    mySpan.value = 'latest';
    mySpan.setAttribute('disabled', true);
    myAnchor.parentNode.replaceChild(mySpan, myAnchor);

    var myAnchor = document.getElementById('target-select');
    var mySpan = document.createElement('input');
    mySpan.setAttribute('type', 'text');
    mySpan.setAttribute('maxLength', '10');
    mySpan.value = 'all targets';
    mySpan.setAttribute('disabled', true);
    myAnchor.parentNode.replaceChild(mySpan, myAnchor);

})();
</script>" >> html/index.html
