Tom
Tom

Reputation: 14250

How can I exclude a certain wiki page from appearing in the trac search?

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

Upvotes: 1

Views: 197

Answers (1)

Remy Blank
Remy Blank

Reputation: 4285

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() of WikiModule (see here) and filters the results (probably by matching the URL, which would be a bit of a hack).

Upvotes: 2

Related Questions