Skip to content

Commit 2c51dff

Browse files
minor typo fix in navbar insertion script (causing issue) (#113)
* Update insert_navbar.sh * Update assets/scripts/insert_navbar.sh Co-authored-by: Hong Ge <[email protected]> * Update assets/scripts/insert_navbar.sh Co-authored-by: Hong Ge <[email protected]> * Update assets/scripts/insert_navbar.sh Co-authored-by: Hong Ge <[email protected]> * Update insert_navbar.sh --------- Co-authored-by: Hong Ge <[email protected]>
1 parent b9e1ff3 commit 2c51dff

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

assets/scripts/insert_navbar.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ fi
1818

1919
# Directory containing HTML files
2020
HTML_DIR=$1
21-
# URL of the navigation bar HTML file
22-
NAVBAR_URL=$2
21+
# Source URL of the navigation bar HTML file
22+
NAVBAR_SOURCE_URL=$2
2323
# Shift off the first two arguments so we can parse the rest
2424
shift 2
2525

@@ -43,15 +43,15 @@ while [[ $# -gt 0 ]]; do
4343
done
4444

4545
# Determine if NAVBAR_SOURCE is a URL (starts with http or https) or a file path
46-
if [[ $NAVBAR_SOURCE == http* ]]; then
47-
NAVBAR_HTML=$(curl -s "$NAVBAR_SOURCE")
46+
if [[ $NAVBAR_SOURCE_URL == http* ]]; then
47+
NAVBAR_HTML=$(curl -s "$NAVBAR_SOURCE_URL")
4848
else
49-
NAVBAR_HTML=$(cat "$NAVBAR_SOURCE")
49+
NAVBAR_HTML=$(cat "$NAVBAR_SOURCE_URL")
5050
fi
5151

5252
# Check if the download was successful
5353
if [ -z "$NAVBAR_HTML" ]; then
54-
echo "Failed to download navbar HTML from '$NAVBAR_URL'"
54+
echo "Failed to download navbar HTML from '$NAVBAR_SOURCE_URL'"
5555
exit 1
5656
fi
5757

0 commit comments

Comments
 (0)