search: skip pages that do not have any title
This commit is contained in:
parent
d01bc8ed95
commit
6faeff8c0a
|
@ -97,6 +97,8 @@ def publish_mallard(module, branch, directory):
|
|||
text = open(page_file).read()
|
||||
text = re.sub('<title.*type="sort".*</title>', '', text)
|
||||
titles = re.findall('<title.*>(.*)<\/title>', text)
|
||||
if not titles:
|
||||
continue
|
||||
pages.append({
|
||||
'id': os.path.basename(page_file).rsplit('.', 1)[0],
|
||||
'title': remove_tags(titles[0]),
|
||||
|
|
Loading…
Reference in New Issue