Skip to content

Build your personal knowledge base with Trilium Notes

docs: Deploy to docs folder

Elian Doran0a1a8c5a278f
diff --git a/docs-new/index.template.html b/docs-new/index.template.html
new file mode 100644
index 0000000000..c36a511726
--- /dev/null
+++ b/docs-new/index.template.html
@@ -0,0 +1,10 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="refresh" content="0; url=./share/{{ROOT_NOTE_ID}}" />
+ </head>
+
+ <body>
+
+ </body>
+</html>
\ No newline at end of file
diff --git a/docs-new/prepare.sh b/docs-new/prepare.sh
index 09e8e686e8..13819e8cb7 100755
--- a/docs-new/prepare.sh
+++ b/docs-new/prepare.sh
@@ -1,11 +1,15 @@
+#!/usr/bin/env bash
+
if [ ! -f .env ]; then
echo "Missing .env file, cannot proceed."
exit 1
fi
-output_dir="output"
-rm -rf "$output_dir"
+script_dir=$(realpath $(dirname $0))
+output_dir="$script_dir/../docs"
mkdir -p "$output_dir"
+rm -f "$output_dir"/*
+rm -rf "$output_dir"/{assets,share}
source ./.env
diff --git a/docs-new/preview.sh b/docs-new/preview.sh
index a7860509c9..ead04b24d8 100755
--- a/docs-new/preview.sh
+++ b/docs-new/preview.sh
@@ -1 +1,5 @@
+#!/usr/bin/env bash
+
+script_dir=$(realpath $(dirname $0))
+output_dir="$script_dir/../docs"
httpd -fv -p 127.0.0.1:8089 -h output
\ No newline at end of file