Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow use top meta props in headerTemplate and footerTemplate #165

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

monstress2
Copy link

Allow use top meta properties in headerTemplate and footerTemplate when export to pdf.
Use lable "{{ author }}" at headerTemplate or footerTemplate to replace them by top property "author".

Example.
Set at md file meta data with title, date and author. Then set headerTemplate with lables {{author}} and {{date}}. And export md to pdf.

---
title: "some title"
date: "2024-01-01"
author: "Me"
---
# test

Set headerTemplate setting to :
<div style='font-size: 9px; margin-left: 1cm;'> <span class='title'></span></div> <div style='font-size: 9px; margin-left: auto; margin-right: 1cm; '> {{author}}, {{date}} </div>

Export to pdf. At header:
some title Me, 2024-01-01

it my first public PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant