File tree Expand file tree Collapse file tree 3 files changed +34
-44
lines changed Expand file tree Collapse file tree 3 files changed +34
-44
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # Modify Plotly chart HTML files to disable showLink
4+
5+ cd charts
6+
7+ for file in * .html; do
8+ # Skip index.html
9+ if [ " $file " = " index.html" ]; then
10+ continue
11+ fi
12+
13+ # Check if file exists and is not empty
14+ if [ ! -f " $file " ] || [ ! -s " $file " ]; then
15+ continue
16+ fi
17+
18+ # Check if modification hasn't already been done
19+ if grep -q ' "showLink"\s*:\s*false' " $file " ; then
20+ echo " $file already has showLink disabled, skipping"
21+ continue
22+ fi
23+
24+ # Replace "showLink": true with "showLink": false
25+ sed -i.bak ' s/"showLink"[[:space:]]*:[[:space:]]*true/"showLink": false/g' " $file "
26+
27+ # Remove backup file
28+ rm -f " ${file} .bak"
29+
30+ echo " Disabled showLink in $file "
31+ done
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -25,10 +25,10 @@ jobs:
2525 - name : Checkout
2626 uses : actions/checkout@v4
2727
28- - name : Inject CSS to hide Chart Studio links
28+ - name : Disable Chart Studio showLink
2929 run : |
30- chmod +x .github/scripts/inject-css .sh
31- .github/scripts/inject-css .sh
30+ chmod +x .github/scripts/disable-showlink .sh
31+ .github/scripts/disable-showlink .sh
3232
3333 - name : Generate index page
3434 run : |
You can’t perform that action at this time.
0 commit comments