diff --git a/glance-system/glance-orsi.yaml b/glance-system/glance-orsi.yaml
index b99908b..9382f4e 100644
--- a/glance-system/glance-orsi.yaml
+++ b/glance-system/glance-orsi.yaml
@@ -46,6 +46,274 @@ data:
port: 8080
assets-path: /app/config/assets
+ document:
+ head: |
+
+
+
+
branding:
logo-url: https://web.dooplex.hu/static/dooplex_logo_orsi_3.png
favicon-url: https://web.dooplex.hu/static/dooplex_favicon_orsi.png
@@ -920,6 +1188,53 @@ spec:
runAsUser: 1000
runAsGroup: 1000
fsGroup: 1000
+ initContainers:
+ - name: build-bookmarks-index
+ image: mikefarah/yq:4.50.1
+ securityContext:
+ runAsUser: 1000
+ runAsGroup: 1000
+ allowPrivilegeEscalation: false
+ command: ["/bin/sh", "-c"]
+ args:
+ - |
+ set -eux
+ which yq
+ yq --version
+
+ mkdir -p /app/assets
+
+ yq eval -o=json '
+ [ .pages[] as $p
+ | $p.columns[]? as $c
+ | $c.widgets[]? as $w
+ | select($w.type == "bookmarks")
+ | $w.groups[]? as $g
+ | $g.links[]?
+ | select(.url != null and .url != "")
+ | {
+ "title": (.title // .url),
+ "url": .url,
+ "page": ($p.name // ""),
+ "widget": ($w.title // ""),
+ "group": ($g.title // "")
+ }
+ ] | unique_by(.url)
+ ' /config/glance.yml > /app/assets/bookmarks.json
+
+ echo "Bookmarks indexed: $(yq eval -r 'length' /app/assets/bookmarks.json)"
+ volumeMounts:
+ - name: config
+ mountPath: /config
+ readOnly: true
+ - name: assets
+ mountPath: /app/assets
+ volumeMounts:
+ - name: config
+ mountPath: /config
+ readOnly: true
+ - name: assets
+ mountPath: /app/assets
containers:
- name: glance
image: glanceapp/glance:v0.8.4