Skip to content

Commit

Permalink
Add override for HTML title
Browse files Browse the repository at this point in the history
  • Loading branch information
remram44 committed Apr 19, 2023
1 parent 9c43ee5 commit 8693f0e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions k8s/helm/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ spec:
name: {{ .Values.zenodoTokenSecret }}
key: zenodo_token
{{- end }}
{{- if .Values.pageTitle }}
- name: PAGE_TITLE
value: {{ .Values.pageTitle }}
{{- end }}
- name: OVERRIDE_RUNNER_IMAGE
value: "{{ .Values.runner_image_override | default (printf "%s:%s" .Values.image.repository (.Values.image.tag | default .Chart.AppVersion)) }}"
ports:
Expand Down
3 changes: 3 additions & 0 deletions k8s/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""

# Override the title of the HTML pages, defaults to "ReproServer"
pageTitle: ""

serviceAccount:
# Specifies whether a service account should be created
create: true
Expand Down
1 change: 1 addition & 0 deletions reproserver/web/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ def render_string(self, template_name, **kwargs):
handler=self,
current_user=self.current_user,
version=__version__,
page_title=os.environ.get('PAGE_TITLE', 'ReproServer'),
**kwargs)

def is_json_requested(self):
Expand Down
2 changes: 1 addition & 1 deletion reproserver/web/templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link rel="stylesheet" href="{{ static_url('css/bootstrap.min.css') }}">
<link rel="stylesheet" href="{{ static_url('css/custom.css') }}">

<title>ReproServer</title>
<title>{{ page_title }}</title>
<meta name="description" content="Reproduce ReproZip packages in the cloud">
</head>
<body>
Expand Down

0 comments on commit 8693f0e

Please sign in to comment.