This is an automated email from the ASF dual-hosted git repository. kentontaylor pushed a commit to branch kt/better_empty_page_detect in repository https://gitbox.apache.org/repos/asf/allura.git
commit 21865edc2fbd91cf804dde03cbd25b3199450c6c Author: Kenton Taylor <[email protected]> AuthorDate: Fri Jun 24 20:35:57 2022 +0000 Better detection of empty wiki pages --- ForgeWiki/forgewiki/wiki_main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ForgeWiki/forgewiki/wiki_main.py b/ForgeWiki/forgewiki/wiki_main.py index 07c51094b..6648e7c13 100644 --- a/ForgeWiki/forgewiki/wiki_main.py +++ b/ForgeWiki/forgewiki/wiki_main.py @@ -241,7 +241,11 @@ The wiki uses [Markdown](%s) syntax. def should_noindex_page(self, page): """Checks whether a page should not be indexed.""" # If page has default name (i.e. 'Home') and has not been edited, noindex. - return page and page['title'] == self.default_root_page_name and page['version'] == 1 + res = page and page['title'] == self.default_root_page_name and page['version'] == 1 + if not res: + if page and page['text'] in ('You can edit this description', ): + res = True + return res def create_common_wiki_menu(self, has_create_access, admin_menu=False): links = []
