mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Remove duplicate tags and authors in metadata
This commit is contained in:
parent
ad72287b4c
commit
7f795ed558
4 changed files with 31 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ from __future__ import print_function, unicode_literals
|
|||
import logging
|
||||
import os
|
||||
import re
|
||||
from collections import OrderedDict
|
||||
|
||||
import docutils
|
||||
import docutils.core
|
||||
|
|
@ -72,7 +73,9 @@ def ensure_metadata_list(text):
|
|||
else:
|
||||
text = text.split(',')
|
||||
|
||||
return [v for v in (w.strip() for w in text) if v]
|
||||
return list(OrderedDict.fromkeys(
|
||||
[v for v in (w.strip() for w in text) if v]
|
||||
))
|
||||
|
||||
|
||||
def _process_if_nonempty(processor, name, settings):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue