Skip to content

allow use top meta props in headerTemplate and footerTemplate#165

Open
monstress2 wants to merge 1 commit into
qjebbs:masterfrom
monstress2:feature-header-footer-extend-by-meta
Open

allow use top meta props in headerTemplate and footerTemplate#165
monstress2 wants to merge 1 commit into
qjebbs:masterfrom
monstress2:feature-header-footer-extend-by-meta

Conversation

@monstress2

Copy link
Copy Markdown

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