From 21cbfb343eb5afa8c965041200879c5d26c0d0a4 Mon Sep 17 00:00:00 2001 From: Michael Dempsey Date: Thu, 30 May 2024 10:34:36 -0700 Subject: [PATCH] Support custom page_data_hook function --- notebook/app.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/notebook/app.py b/notebook/app.py index 832bb1f5bb..d7cc0079a1 100644 --- a/notebook/app.py +++ b/notebook/app.py @@ -120,6 +120,12 @@ def get_page_config(self) -> dict[str, t.Any]: logger=self.log, ), ) + + # modify page config with custom hook + page_config_hook = self.settings.get("page_config_hook", None) + if page_config_hook: + page_config = page_config_hook(self, page_config) + return page_config