Skip to content

Commit

Permalink
create config folder
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanmi151 committed Feb 7, 2025
1 parent fdc5634 commit f51e1d0
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
5 changes: 5 additions & 0 deletions config/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# configuration

this folder contains the configurations files for maelstro

we usually copy it into georchestra datadir
File renamed without changes.
15 changes: 15 additions & 0 deletions config/scripts/add-header-webcomponent.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/sh

# To be properl executed by datahub initialization need the +x flag
# so you need to add it with chmod and commit/push it

MAELSTRO_DIR=${1:-/app}
SNIPPET="<script src='https://cdn.jsdelivr.net/gh/georchestra/header@dist/header.js'></script><geor-header active-app='maelstro' style='height:90px'></geor-header>"

if grep -q "${SNIPPET}" "${MAELSTRO_DIR}/index.html"; then
echo "[INFO] geOrchestra: header already present."
exit 0
fi

echo "[INFO] geOrchestra: adding header in the main page..."
sed -i "s#<body>#<body>${SNIPPET}#" ${MAELSTRO_DIR}/index.html

0 comments on commit f51e1d0

Please sign in to comment.