Skip static content for toc extraction

This commit is contained in:
bas smit
2013-05-18 20:07:37 +02:00
parent 749f499206
commit e07dac8799

View File

@@ -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:]