We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c5dafd commit c11b23bCopy full SHA for c11b23b
assets/scripts/insert_navbar.sh
@@ -42,8 +42,12 @@ while [[ $# -gt 0 ]]; do
42
esac
43
done
44
45
-# Download the navigation bar HTML content
46
-NAVBAR_HTML=$(curl -s "$NAVBAR_URL")
+# Determine if NAVBAR_SOURCE is a URL (starts with http or https) or a file path
+if [[ $NAVBAR_SOURCE == http* ]]; then
47
+ NAVBAR_HTML=$(curl -s "$NAVBAR_SOURCE")
48
+else
49
+ NAVBAR_HTML=$(cat "$NAVBAR_SOURCE")
50
+fi
51
52
# Check if the download was successful
53
if [ -z "$NAVBAR_HTML" ]; then
0 commit comments