Skip to content

Commit c11b23b

Browse files
Update insert_navbar.sh
1 parent 3c5dafd commit c11b23b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

assets/scripts/insert_navbar.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,12 @@ while [[ $# -gt 0 ]]; do
4242
esac
4343
done
4444

45-
# Download the navigation bar HTML content
46-
NAVBAR_HTML=$(curl -s "$NAVBAR_URL")
45+
# 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")
48+
else
49+
NAVBAR_HTML=$(cat "$NAVBAR_SOURCE")
50+
fi
4751

4852
# Check if the download was successful
4953
if [ -z "$NAVBAR_HTML" ]; then

0 commit comments

Comments
 (0)