Skip to content

Commit 8679ba5

Browse files
committed
Make default opengraph title configurable
1 parent fbeb074 commit 8679ba5

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

binderhub/app.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,14 @@ def _google_analytics_deprecation(self, change):
166166
config=True,
167167
)
168168

169+
default_opengraph_title = Unicode(
170+
"The Binder Project",
171+
help="""
172+
The default opengraph title for pages that don't have a generated opengraph title.
173+
""",
174+
config=True,
175+
)
176+
169177
extra_footer_scripts = Dict(
170178
{},
171179
help="""
@@ -929,6 +937,7 @@ def initialize(self, *args, **kwargs):
929937
"log_function": log_request,
930938
"image_prefix": self.image_prefix,
931939
"debug": self.debug,
940+
"default_opengraph_title": self.default_opengraph_title,
932941
"launcher": self.launcher,
933942
"ban_networks": self.ban_networks,
934943
"build_pool": self.build_pool,

binderhub/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class UIHandler(BaseHandler):
1818
"""
1919

2020
def initialize(self):
21-
self.opengraph_title = "The Binder Project"
21+
self.opengraph_title = self.settings["default_opengraph_title"]
2222
self.page_config = {}
2323
return super().initialize()
2424

0 commit comments

Comments
 (0)