From 5bcae52d081ab96c75f54c104c35bb4fbf6af8b1 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sat, 20 Jul 2024 13:08:22 +0300 Subject: [PATCH] docs: Always use HTML extensions --- docs-new/index.template.html | 2 +- docs-new/prepare.sh | 9 ++------- docs-new/preview.sh | 2 +- docs/index.html | 2 +- docs/share/4yYHqKbLovVX.html | 10 +++++----- docs/share/QXCi6Y1SYulw.html | 8 ++++---- docs/share/VS22Hq5PBFNf.html | 10 +++++----- docs/share/hkrBX8KE1HQl.html | 8 ++++---- 8 files changed, 23 insertions(+), 28 deletions(-) diff --git a/docs-new/index.template.html b/docs-new/index.template.html index c36a511726..c37cb1c986 100644 --- a/docs-new/index.template.html +++ b/docs-new/index.template.html @@ -1,7 +1,7 @@ - + diff --git a/docs-new/prepare.sh b/docs-new/prepare.sh index e791434ed2..91a520520a 100755 --- a/docs-new/prepare.sh +++ b/docs-new/prepare.sh @@ -15,18 +15,13 @@ source ./.env # 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" +wget -rpEk -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" -# Rename share/* to share/*.html because GitHub Pages will ask the client to download the files otherwise. -for file in "$output_dir/share"/*; do - mv "$file" "$file.html" -done - # Create home page with redirect index_dest_path="$output_dir/index.html" cp index.template.html "$index_dest_path" -sed -i "s/{{ROOT_NOTE_ID}}/$ROOT_NOTE_ID/g" "$index_dest_path" \ No newline at end of file +sed -i "s/{{ROOT_NOTE_ID}}/$ROOT_NOTE_ID/g" "$index_dest_path" diff --git a/docs-new/preview.sh b/docs-new/preview.sh index ead04b24d8..507dec3fc8 100755 --- a/docs-new/preview.sh +++ b/docs-new/preview.sh @@ -2,4 +2,4 @@ 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 +httpd -fv -p 127.0.0.1:8089 -h "$output_dir" \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 974b29b473..525ed208ce 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,7 +1,7 @@ - + diff --git a/docs/share/4yYHqKbLovVX.html b/docs/share/4yYHqKbLovVX.html index 40fbd79e44..c9bc4b6efe 100644 --- a/docs/share/4yYHqKbLovVX.html +++ b/docs/share/4yYHqKbLovVX.html @@ -40,12 +40,12 @@

Developer's Guide