|
@@ -8,10 +8,12 @@ and place it in its own article.toc variable.
|
|
|
|
|
|
from os import path
|
|
|
from bs4 import BeautifulSoup
|
|
|
-from pelican import signals, readers
|
|
|
+from pelican import signals, readers, contents
|
|
|
|
|
|
|
|
|
def extract_toc(content):
|
|
|
+ if isinstance(content, contents.Static):
|
|
|
+ return
|
|
|
soup = BeautifulSoup(content._content)
|
|
|
filename = content.source_path
|
|
|
extension = path.splitext(filename)[1][1:]
|