Skip to content

Commit

Permalink
[FIX] Custom script addition in header (#469)
Browse files Browse the repository at this point in the history
* [ENH] Move custom scripts to header

That's where we thought they were going all along. But then we added
them to the body and they still worked, so apparently we forgot about
it.

* [FIX] Correct the script placeholder in GH workflow

* Bumped version to v0.9.3

---------

Co-authored-by: Neurobagel Bot <neurobagel-bot[bot]@users.noreply.github.com>
  • Loading branch information
surchs and neurobagel-bot[bot] authored Jan 30, 2025
1 parent a8f8ce3 commit 1dad103
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
run: |
add_script='<script async src="https://w.appzi.io/w.js?token=YVTHd"></script><script defer data-domain="query.neurobagel.org" src="https://plausible.neurobagel.org/js/script.js"></script>'
# Need to use single quotes around sed to avoid ! to be interpreted as a history expansion character
sed -i 's|<!-- Additional script tags -->|'"${add_script}"'|' index.html
sed -i 's|<!-- REPLACE_ME_NB_QUERY_HEADER_SCRIPT_REPLACE_ME -->|'"${add_script}"'|' index.html
- name: Set up Node
uses: actions/setup-node@v4
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
<link rel="icon" type="image/ico" href="./src/assets/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Neurobagel Query Tool</title>
<!-- REPLACE_ME_NB_QUERY_HEADER_SCRIPT_REPLACE_ME -->
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
<!-- REPLACE_ME_NB_QUERY_HEADER_SCRIPT_REPLACE_ME -->
</body>
</html>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "react-query-tool",
"private": true,
"version": "v0.9.1",
"version": "v0.9.3",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down

0 comments on commit 1dad103

Please sign in to comment.