Skip to content

Build your personal knowledge base with Trilium Notes

docs: Get rid of domain in output folder

Elian Doran621cc4a0651f
diff --git a/docs-new/.env b/docs-new/.env
index fa85707e4a..e1182ce1a1 100644
--- a/docs-new/.env
+++ b/docs-new/.env
@@ -1 +1,4 @@
+SHARE_PROTOCOL=https
+SHARE_HOST=notes.eliandoran.me
+ROOT_NOTE_ID=4yYHqKbLovVX
SHARE_URL=https://notes.eliandoran.me/share/4yYHqKbLovVX
\ No newline at end of file
diff --git a/docs-new/prepare.sh b/docs-new/prepare.sh
index 735af9818f..bc579ad280 100755
--- a/docs-new/prepare.sh
+++ b/docs-new/prepare.sh
@@ -8,4 +8,11 @@ rm -rf "$output_dir"
mkdir -p "$output_dir"
source ./.env
-wget -rp -e robots=off "$SHARE_URL" -P "$output_dir"
\ No newline at end of file
+
+# Download everything in output/notes.example.com/share/...
+share_url="$SHARE_PROTOCOL://$SHARE_HOST/share/$ROOT_NOTE_ID"
+wget -rp -e robots=off "$share_url" -P "$output_dir"
+
+# Get rid of the domain in the output folder
+mv "$output_dir/$SHARE_HOST"/* "$output_dir/"
+rmdir "$output_dir/$SHARE_HOST"
\ No newline at end of file