File tree 1 file changed +14
-11
lines changed
1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -90,19 +90,22 @@ def get_queryset(self):
90
90
"""Overwrite default queryset to filter certain files to index"""
91
91
queryset = super (PageDocument , self ).get_queryset ()
92
92
93
- # Exclude some files to not index
94
- excluded_files = [
95
- 'search.html' ,
96
- 'genindex.html' ,
97
- 'py-modindex.html' ,
98
- 'search/index.html' ,
99
- 'genindex/index.html' ,
100
- 'py-modindex/index.html' ,
101
- ]
102
93
103
94
# Do not index files that belong to non sphinx project
104
95
# Also do not index certain files
105
96
queryset = queryset .filter (project__documentation_type__contains = 'sphinx' )
106
- for ending in excluded_files :
107
- queryset = queryset .exclude (path__endswith = ending )
97
+
98
+ # TODO: Make this smarter
99
+ # This was causing issues excluding some valid user documentation pages
100
+ # excluded_files = [
101
+ # 'search.html',
102
+ # 'genindex.html',
103
+ # 'py-modindex.html',
104
+ # 'search/index.html',
105
+ # 'genindex/index.html',
106
+ # 'py-modindex/index.html',
107
+ # ]
108
+ # for ending in excluded_files:
109
+ # queryset = queryset.exclude(path=ending)
110
+
108
111
return queryset
You can’t perform that action at this time.
0 commit comments