diff --git a/md_pdf/assets/static/style.scss b/md_pdf/assets/static/style.scss index 522df91..ddfdefe 100644 --- a/md_pdf/assets/static/style.scss +++ b/md_pdf/assets/static/style.scss @@ -55,6 +55,7 @@ body.footer, body.header { td { text-align: center; + width: 33%; } } } diff --git a/md_pdf/assets/templates/footer-template.html b/md_pdf/assets/templates/footer-template.html index fdf7715..ceabfa5 100644 --- a/md_pdf/assets/templates/footer-template.html +++ b/md_pdf/assets/templates/footer-template.html @@ -6,9 +6,13 @@ + +
Page of + Total Words: {{ word_count }} +
diff --git a/md_pdf/assets/templates/header-template.html b/md_pdf/assets/templates/header-template.html index 91e760b..3f8c9a8 100644 --- a/md_pdf/assets/templates/header-template.html +++ b/md_pdf/assets/templates/header-template.html @@ -4,6 +4,13 @@ + + + + + + +
diff --git a/md_pdf/build/context.py b/md_pdf/build/context.py index 0d14468..e380d42 100644 --- a/md_pdf/build/context.py +++ b/md_pdf/build/context.py @@ -11,6 +11,7 @@ EXTRA_CONTEXT = { def get_context(config, content): context = config['context'].copy() context['title'] = config['title'] - context = dict(context, **EXTRA_CONTEXT) - context['word_count'] = word_count(content) + context = dict(context, **EXTRA_CONTEXT, **{ + 'word_count': word_count(content) + }) return context