diff --git a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing/Exporting HTML for web publish.html b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing/Exporting HTML for web publish.html
index ba74ada3c..2f3341063 100644
--- a/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing/Exporting HTML for web publish.html
+++ b/apps/server/src/assets/doc_notes/en/User Guide/User Guide/Advanced Usage/Sharing/Exporting HTML for web publish.html
@@ -31,6 +31,9 @@
data-list-item-id="e3995e60b9751ea177ac920a901635d4b">The favicon.ico is not handled automatically, it needs to be
manually added on the server after the export is generated.
The “Last updated” for notes is not available.
+ The search functionality works slightly different since the normal one
+ requires an active API to work. In the static export, search still works
+ but uses a different mechanism so results might be different.
Differences from normal .zip export
diff --git a/docs/Developer Guide/!!!meta.json b/docs/Developer Guide/!!!meta.json
index 1f821d9c0..93338db97 100644
--- a/docs/Developer Guide/!!!meta.json
+++ b/docs/Developer Guide/!!!meta.json
@@ -1717,6 +1717,33 @@
"format": "markdown",
"dataFileName": "Hidden notes.md",
"attachments": []
+ },
+ {
+ "isClone": false,
+ "noteId": "vphziLmQeQHY",
+ "notePath": [
+ "jdjRLhLV3TtI",
+ "wbVIolLKDhe2",
+ "vphziLmQeQHY"
+ ],
+ "title": "Share",
+ "notePosition": 260,
+ "prefix": null,
+ "isExpanded": false,
+ "type": "text",
+ "mime": "text/html",
+ "attributes": [
+ {
+ "type": "label",
+ "name": "iconClass",
+ "value": "bx bx-share-alt",
+ "isInheritable": false,
+ "position": 10
+ }
+ ],
+ "format": "markdown",
+ "dataFileName": "Share.md",
+ "attachments": []
}
]
},
diff --git a/docs/Developer Guide/Developer Guide/Development and architecture/Share.md b/docs/Developer Guide/Developer Guide/Development and architecture/Share.md
new file mode 100644
index 000000000..22dc512f5
--- /dev/null
+++ b/docs/Developer Guide/Developer Guide/Development and architecture/Share.md
@@ -0,0 +1,30 @@
+# Share
+## Share theme
+
+The share theme represents the layout, styles and scripts behind the Share notes functionality. The current implementation is a heavy adaptation of [trilium.rocks](https://trilium.rocks/) which is a third-party share theme.
+
+* The theme resides in `packages/share-theme`.
+* The HTML is defined in `src/templates` using EJS templating.
+* The `src/scripts` and `src/styles` subdirectories house the rest of the theme.
+
+## Building the share theme
+
+* In `packages/share-theme`, run `pnpm build` to trigger a build. This will generate `dist` which will then be used by the server.
+* Alternatively, use `pnpm dev` to watch for changes.
+
+## Integration with the server for the share functionality
+
+The server renders the templates using EJS templating from the share theme and hosts the assets.
+
+* In dev mode, the templates and assets are served directly from `packages/share-theme/dist`.
+ * Modifications to the assets (scripts or styles) will reflect without having to restart the server. However the share theme needs to be built first (see previous section).
+ * Changes to the template will require a restart of the server, since they are cached. Simply press Enter in the console with `pnpm server:start` to quickly trigger a restart.
+* In production mode, the share theme is automatically built by the server build script and copied to `dist/share-theme`.
+
+The server route handling this functionality is in `src/share/routes.ts`.
+
+## Exporting to static HTML files
+
+This functionality is also handled by the server, but in `src/services/export/zip/share_theme` instead. It works quite similar to the normal sharing functionality, but it uses `BNote` instead of `SNote` (and so on for other entity types), in order to work regardless of whether a note is shared or not.
+
+The same templates are used and rendered by the server, except that they are stored in a file instead of served to web clients.
\ No newline at end of file
diff --git a/docs/User Guide/User Guide/Advanced Usage/Sharing/Exporting HTML for web publish.md b/docs/User Guide/User Guide/Advanced Usage/Sharing/Exporting HTML for web publish.md
index fab4e35f0..38453563f 100644
--- a/docs/User Guide/User Guide/Advanced Usage/Sharing/Exporting HTML for web publish.md
+++ b/docs/User Guide/User Guide/Advanced Usage/Sharing/Exporting HTML for web publish.md
@@ -17,6 +17,7 @@ Apart from normal Sharing, e
* The URL structure is different. Where in normal sharing it's something along the way of `example.com/share/noteid`, the notes follow an hierarchical structure, such as `docs.triliumnotes.org/user-guide/concepts/navigation/tree-concepts`.
* The `favicon.ico` is not handled automatically, it needs to be manually added on the server after the export is generated.
* The “Last updated” for notes is not available.
+* The search functionality works slightly different since the normal one requires an active API to work. In the static export, search still works but uses a different mechanism so results might be different.
## Differences from normal .zip export