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

add required variables template error to Text.Pandoc.Writers.HTML #8495

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

Conversation

BebeSparkelSparkel
Copy link
Contributor

@BebeSparkelSparkel BebeSparkelSparkel commented Dec 18, 2022

Allows an error to be thrown if a required variable is missing from the context. This has only been applied to the HTML writer but could be added to all the writers. I do not think this is a breaking change since existing templates do not have required variables. It requires the new features in doctemplates pull request jgm/doctemplates#19

cabal.project with the required variable doctemplate https://github.com/BebeSparkelSparkel/pandoc/blob/required-var-html-my-build/cabal.project

Allows an error to be thrown if a required variable is missing from the context.
This has only been applied to the HTML writer but could be added to all the
writers. I do not think this is a breaking change since existing templates do
not have required variables. It requires the new features in doctemplates pull
request jgm/doctemplates#19
@jgm
Copy link
Owner

jgm commented Jan 3, 2023

Can you add something to cabal.project and stack.yaml so that they will use the modified version of doctemplates? Otherwise the tests won't run here.
There are examples in both files already of the sort of thing that is needed.

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.

None yet

2 participants