docs: Always use HTML extensions

This commit is contained in:
Elian Doran 2024-07-20 13:08:22 +03:00
parent 4f5fa9f42b
commit 5bcae52d08
No known key found for this signature in database
8 changed files with 23 additions and 28 deletions

View File

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta http-equiv="refresh" content="0; url=./share/{{ROOT_NOTE_ID}}" /> <meta http-equiv="refresh" content="0; url=./share/{{ROOT_NOTE_ID}}.html" />
</head> </head>
<body> <body>

View File

@ -15,18 +15,13 @@ source ./.env
# Download everything in output/notes.example.com/share/... # Download everything in output/notes.example.com/share/...
share_url="$SHARE_PROTOCOL://$SHARE_HOST/share/$ROOT_NOTE_ID" 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 # Get rid of the domain in the output folder
mv "$output_dir/$SHARE_HOST"/* "$output_dir/" mv "$output_dir/$SHARE_HOST"/* "$output_dir/"
rmdir "$output_dir/$SHARE_HOST" 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 # Create home page with redirect
index_dest_path="$output_dir/index.html" index_dest_path="$output_dir/index.html"
cp index.template.html "$index_dest_path" cp index.template.html "$index_dest_path"
sed -i "s/{{ROOT_NOTE_ID}}/$ROOT_NOTE_ID/g" "$index_dest_path" sed -i "s/{{ROOT_NOTE_ID}}/$ROOT_NOTE_ID/g" "$index_dest_path"

View File

@ -2,4 +2,4 @@
script_dir=$(realpath $(dirname $0)) script_dir=$(realpath $(dirname $0))
output_dir="$script_dir/../docs" output_dir="$script_dir/../docs"
httpd -fv -p 127.0.0.1:8089 -h output httpd -fv -p 127.0.0.1:8089 -h "$output_dir"

View File

@ -1,7 +1,7 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta http-equiv="refresh" content="0; url=./share/4yYHqKbLovVX" /> <meta http-equiv="refresh" content="0; url=./share/4yYHqKbLovVX.html" />
</head> </head>
<body> <body>

View File

@ -40,12 +40,12 @@
<ul> <ul>
<li> <li>
<a href="./hkrBX8KE1HQl" <a href="hkrBX8KE1HQl.html"
class="type-text">Internationalisation</a> class="type-text">Internationalisation</a>
</li> </li>
<li> <li>
<a href="./VS22Hq5PBFNf" <a href="VS22Hq5PBFNf.html"
class="type-text">Dependency Management</a> class="type-text">Dependency Management</a>
</li> </li>
@ -76,7 +76,7 @@
<a class="type-text" href="./hkrBX8KE1HQl">Internationalisation</a> <a class="type-text" href="hkrBX8KE1HQl.html">Internationalisation</a>
</p> </p>
@ -90,7 +90,7 @@
<a class="type-text" href="./VS22Hq5PBFNf">Dependency Management</a> <a class="type-text" href="VS22Hq5PBFNf.html">Dependency Management</a>
</p> </p>
@ -103,7 +103,7 @@
<a class="type-text" href="./QXCi6Y1SYulw">Adding a new client library</a> <a class="type-text" href="QXCi6Y1SYulw.html">Adding a new client library</a>
</p> </p>

View File

@ -27,7 +27,7 @@
<div id="main"> <div id="main">
<nav id="parentLink"> <nav id="parentLink">
parent: <a href="VS22Hq5PBFNf" parent: <a href="VS22Hq5PBFNf.html"
class="type-text">Dependency Management</a> class="type-text">Dependency Management</a>
</nav> </nav>
@ -102,7 +102,7 @@ await library_loader.requireLibrary(library_loader.I18NEXT);</code></pre><p>Make
<a class="type-text" href="./4yYHqKbLovVX">Developer&#39;s Guide</a> <a class="type-text" href="4yYHqKbLovVX.html">Developer&#39;s Guide</a>
</p> </p>
@ -115,7 +115,7 @@ await library_loader.requireLibrary(library_loader.I18NEXT);</code></pre><p>Make
<a class="type-text" href="./hkrBX8KE1HQl">Internationalisation</a> <a class="type-text" href="hkrBX8KE1HQl.html">Internationalisation</a>
</p> </p>
@ -129,7 +129,7 @@ await library_loader.requireLibrary(library_loader.I18NEXT);</code></pre><p>Make
<a class="type-text" href="./VS22Hq5PBFNf">Dependency Management</a> <a class="type-text" href="VS22Hq5PBFNf.html">Dependency Management</a>
</p> </p>

View File

@ -27,7 +27,7 @@
<div id="main"> <div id="main">
<nav id="parentLink"> <nav id="parentLink">
parent: <a href="4yYHqKbLovVX" parent: <a href="4yYHqKbLovVX.html"
class="type-text">Developer&#39;s Guide</a> class="type-text">Developer&#39;s Guide</a>
</nav> </nav>
@ -45,7 +45,7 @@
<ul> <ul>
<li> <li>
<a href="./QXCi6Y1SYulw" <a href="QXCi6Y1SYulw.html"
class="type-text">Adding a new client library</a> class="type-text">Adding a new client library</a>
</li> </li>
@ -63,7 +63,7 @@
<a class="type-text" href="./4yYHqKbLovVX">Developer&#39;s Guide</a> <a class="type-text" href="4yYHqKbLovVX.html">Developer&#39;s Guide</a>
</p> </p>
@ -76,7 +76,7 @@
<a class="type-text" href="./hkrBX8KE1HQl">Internationalisation</a> <a class="type-text" href="hkrBX8KE1HQl.html">Internationalisation</a>
</p> </p>
@ -103,7 +103,7 @@
<a class="type-text" href="./QXCi6Y1SYulw">Adding a new client library</a> <a class="type-text" href="QXCi6Y1SYulw.html">Adding a new client library</a>
</p> </p>

View File

@ -27,7 +27,7 @@
<div id="main"> <div id="main">
<nav id="parentLink"> <nav id="parentLink">
parent: <a href="4yYHqKbLovVX" parent: <a href="4yYHqKbLovVX.html"
class="type-text">Developer&#39;s Guide</a> class="type-text">Developer&#39;s Guide</a>
</nav> </nav>
@ -58,7 +58,7 @@
<a class="type-text" href="./4yYHqKbLovVX">Developer&#39;s Guide</a> <a class="type-text" href="4yYHqKbLovVX.html">Developer&#39;s Guide</a>
</p> </p>
@ -85,7 +85,7 @@
<a class="type-text" href="./VS22Hq5PBFNf">Dependency Management</a> <a class="type-text" href="VS22Hq5PBFNf.html">Dependency Management</a>
</p> </p>
@ -98,7 +98,7 @@
<a class="type-text" href="./QXCi6Y1SYulw">Adding a new client library</a> <a class="type-text" href="QXCi6Y1SYulw.html">Adding a new client library</a>
</p> </p>