如何排除某个 wiki 页面出现在 trac 搜索中?
我们使用 trac 项目管理软件。我希望能够阻止某些 wiki 页面出现在 trac 搜索结果中。例如,一些开发人员在 wiki 中保存时间表,其中包含很多关键字,但从来没有太多有用的文档。
有没有办法配置 trac 以忽略 wiki 页面列表?
作为参考,这是我当前在 trac.ini
的 [search]
和 [wiki]
部分中的内容:
[search]
default_disabled_filters = changeset, milestone
min_query_length = 3
[wiki]
ignore_missing_pages = false
max_size = 262144
render_unsafe_content = true
split_page_names = false
We use the trac project management software. I want to be able to prevent certain wiki pages appearing in the trac search results. For example, some developers keep timesheets in the wiki and they contain a lot of keywords but never much useful documentation.
Is there a way to configure trac to ignore a list of wiki pages?
For reference, this is what I currently have in the [search]
and [wiki]
sections of my trac.ini
:
[search]
default_disabled_filters = changeset, milestone
min_query_length = 3
[wiki]
ignore_missing_pages = false
max_size = 262144
render_unsafe_content = true
split_page_names = false
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你不能开箱即用地做到这一点,而且我不知道有什么插件可以做到这一点。您必须编写一个小插件来对
WikiModule
的get_search_results()
方法进行猴子修补(请参阅 此处)并过滤结果(可能是通过匹配 URL,这有点黑客行为)。You can't do that out-of-the-box, and I don't know of a plugin that allows to do that. You would have to write a small plugin that monkey-patches the method
get_search_results()
ofWikiModule
(see here) and filters the results (probably by matching the URL, which would be a bit of a hack).