Skip to content

Commit

Permalink
Make default opengraph title configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvipanda committed Dec 23, 2024
1 parent fbeb074 commit 8679ba5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions binderhub/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,14 @@ def _google_analytics_deprecation(self, change):
config=True,
)

default_opengraph_title = Unicode(
"The Binder Project",
help="""
The default opengraph title for pages that don't have a generated opengraph title.
""",
config=True,
)

extra_footer_scripts = Dict(
{},
help="""
Expand Down Expand Up @@ -929,6 +937,7 @@ def initialize(self, *args, **kwargs):
"log_function": log_request,
"image_prefix": self.image_prefix,
"debug": self.debug,
"default_opengraph_title": self.default_opengraph_title,
"launcher": self.launcher,
"ban_networks": self.ban_networks,
"build_pool": self.build_pool,
Expand Down
2 changes: 1 addition & 1 deletion binderhub/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class UIHandler(BaseHandler):
"""

def initialize(self):
self.opengraph_title = "The Binder Project"
self.opengraph_title = self.settings["default_opengraph_title"]
self.page_config = {}
return super().initialize()

Expand Down

0 comments on commit 8679ba5

Please sign in to comment.