From 8573a65f940b15452f7acf4c26a5a958ad396067 Mon Sep 17 00:00:00 2001 From: gopro2027 Date: Sun, 22 Jun 2025 13:53:55 -0400 Subject: [PATCH] Updated documentation with info on generating manifests (#602) * Updated documentation with info on generating manifests and version management * Apply suggestions from code review --------- Co-authored-by: Paulus Schoutsen --- index.html | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/index.html b/index.html index 445306e..ebb931a 100644 --- a/index.html +++ b/index.html @@ -552,6 +552,35 @@ button.overrides = { }; +

Generating a manifest dynamically & version management

+

+ Alternatively to a static manifest JSON file, you can generate a Blob URL of a JSON object using URL.createObjectURL to use as the manifest url. This can be useful in situations where you have many firmware bin files, e.g. previous software versions, where you don't want to have a different static manifest json file for each bin. If you are hosting on github.io, this can be paired nicely with github's REST API to view all the bin files inside a folder. +

+
+const manifest = {
+    "name": name,
+    "version": version,
+    "funding_url": funding_url,
+    "new_install_prompt_erase": true,
+    "builds": [
+        {
+            "chipFamily": "ESP32",
+            "improv": false,
+            "parts": [
+                { "path": dependenciesDir+"bootloader.bin", "offset": 4096 },
+                { "path": dependenciesDir+"partitions.bin", "offset": 32768 },
+                { "path": dependenciesDir+"boot_app0.bin", "offset": 57344 },
+                { "path": firmwareFile, "offset": 65536 }
+            ]
+        }
+    ]
+}
+
+const json = JSON.stringify(manifest);
+const blob = new Blob([json], {type: "application/json"});
+document.querySelector("esp-web-install-button").manifest = URL.createObjectURL(blob);
+      
+

Customizing the look and feel

You can change the colors of the default UI elements with CSS custom