Skip to content

Commit

Permalink
docs: Always use HTML extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
eliandoran committed Jul 20, 2024
1 parent 4f5fa9f commit 5bcae52
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 28 deletions.
2 changes: 1 addition & 1 deletion docs-new/index.template.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<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>

<body>
Expand Down
9 changes: 2 additions & 7 deletions docs-new/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
sed -i "s/{{ROOT_NOTE_ID}}/$ROOT_NOTE_ID/g" "$index_dest_path"
2 changes: 1 addition & 1 deletion docs-new/preview.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

script_dir=$(realpath $(dirname $0))
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"
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="refresh" content="0; url=./share/4yYHqKbLovVX" />
<meta http-equiv="refresh" content="0; url=./share/4yYHqKbLovVX.html" />
</head>

<body>
Expand Down
10 changes: 5 additions & 5 deletions docs/share/4yYHqKbLovVX.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ <h1 id="title">Developer&#39;s Guide</h1>
<ul>

<li>
<a href="./hkrBX8KE1HQl"
<a href="hkrBX8KE1HQl.html"
class="type-text">Internationalisation</a>
</li>

<li>
<a href="./VS22Hq5PBFNf"
<a href="VS22Hq5PBFNf.html"
class="type-text">Dependency Management</a>
</li>

Expand Down Expand Up @@ -76,7 +76,7 @@ <h1 id="title">Developer&#39;s Guide</h1>



<a class="type-text" href="./hkrBX8KE1HQl">Internationalisation</a>
<a class="type-text" href="hkrBX8KE1HQl.html">Internationalisation</a>

</p>

Expand All @@ -90,7 +90,7 @@ <h1 id="title">Developer&#39;s Guide</h1>



<a class="type-text" href="./VS22Hq5PBFNf">Dependency Management</a>
<a class="type-text" href="VS22Hq5PBFNf.html">Dependency Management</a>

</p>

Expand All @@ -103,7 +103,7 @@ <h1 id="title">Developer&#39;s Guide</h1>



<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>

Expand Down
8 changes: 4 additions & 4 deletions docs/share/QXCi6Y1SYulw.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<div id="main">

<nav id="parentLink">
parent: <a href="VS22Hq5PBFNf"
parent: <a href="VS22Hq5PBFNf.html"
class="type-text">Dependency Management</a>
</nav>

Expand Down Expand Up @@ -102,7 +102,7 @@ <h1 id="title">Adding a new client library</h1>



<a class="type-text" href="./4yYHqKbLovVX">Developer&#39;s Guide</a>
<a class="type-text" href="4yYHqKbLovVX.html">Developer&#39;s Guide</a>

</p>

Expand All @@ -115,7 +115,7 @@ <h1 id="title">Adding a new client library</h1>



<a class="type-text" href="./hkrBX8KE1HQl">Internationalisation</a>
<a class="type-text" href="hkrBX8KE1HQl.html">Internationalisation</a>

</p>

Expand All @@ -129,7 +129,7 @@ <h1 id="title">Adding a new client library</h1>



<a class="type-text" href="./VS22Hq5PBFNf">Dependency Management</a>
<a class="type-text" href="VS22Hq5PBFNf.html">Dependency Management</a>

</p>

Expand Down
10 changes: 5 additions & 5 deletions docs/share/VS22Hq5PBFNf.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<div id="main">

<nav id="parentLink">
parent: <a href="4yYHqKbLovVX"
parent: <a href="4yYHqKbLovVX.html"
class="type-text">Developer&#39;s Guide</a>
</nav>

Expand All @@ -45,7 +45,7 @@ <h1 id="title">Dependency Management</h1>
<ul>

<li>
<a href="./QXCi6Y1SYulw"
<a href="QXCi6Y1SYulw.html"
class="type-text">Adding a new client library</a>
</li>

Expand All @@ -63,7 +63,7 @@ <h1 id="title">Dependency Management</h1>



<a class="type-text" href="./4yYHqKbLovVX">Developer&#39;s Guide</a>
<a class="type-text" href="4yYHqKbLovVX.html">Developer&#39;s Guide</a>

</p>

Expand All @@ -76,7 +76,7 @@ <h1 id="title">Dependency Management</h1>



<a class="type-text" href="./hkrBX8KE1HQl">Internationalisation</a>
<a class="type-text" href="hkrBX8KE1HQl.html">Internationalisation</a>

</p>

Expand All @@ -103,7 +103,7 @@ <h1 id="title">Dependency Management</h1>



<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>

Expand Down
8 changes: 4 additions & 4 deletions docs/share/hkrBX8KE1HQl.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<div id="main">

<nav id="parentLink">
parent: <a href="4yYHqKbLovVX"
parent: <a href="4yYHqKbLovVX.html"
class="type-text">Developer&#39;s Guide</a>
</nav>

Expand Down Expand Up @@ -58,7 +58,7 @@ <h1 id="title">Internationalisation</h1>



<a class="type-text" href="./4yYHqKbLovVX">Developer&#39;s Guide</a>
<a class="type-text" href="4yYHqKbLovVX.html">Developer&#39;s Guide</a>

</p>

Expand All @@ -85,7 +85,7 @@ <h1 id="title">Internationalisation</h1>



<a class="type-text" href="./VS22Hq5PBFNf">Dependency Management</a>
<a class="type-text" href="VS22Hq5PBFNf.html">Dependency Management</a>

</p>

Expand All @@ -98,7 +98,7 @@ <h1 id="title">Internationalisation</h1>



<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>

Expand Down

0 comments on commit 5bcae52

Please sign in to comment.