Add wordcount
This commit is contained in:
parent
70351adae6
commit
805ddbcadb
|
@ -1,4 +1,5 @@
|
|||
from md_pdf.consts import TEMPLATES_DIR, STATIC_DIR
|
||||
from word_count import word_count
|
||||
|
||||
|
||||
EXTRA_CONTEXT = {
|
||||
|
@ -11,4 +12,5 @@ def get_context(config, content):
|
|||
context = config['context'].copy()
|
||||
context['title'] = config['title']
|
||||
context = dict(context, **EXTRA_CONTEXT)
|
||||
context['word_count'] = word_count(content)
|
||||
return context
|
||||
|
|
Reference in New Issue