feat(Pandoc): Add sitename to metadata if provided
If a sitefile is provided then that data is passed via the commandline to pandoc, this then adds it to the YAML metadata available to filters and templates.
This commit is contained in:
parent
ca84cafbdb
commit
0666436a59
|
|
@ -151,6 +151,11 @@ public static class Conversions{
|
|||
}
|
||||
|
||||
pandocArgs += " --from markdown+raw_attribute ";
|
||||
if (!string.IsNullOrEmpty(settings.SiteName))
|
||||
{
|
||||
// This is used in my template to add the sitename to the title element.
|
||||
pandocArgs += $" --metadata=\"SiteName:{settings.SiteName}\"";
|
||||
}
|
||||
if (!Directory.Exists(Path.GetDirectoryName(GetNewName(file,settings,".html"))))
|
||||
{
|
||||
Directory.CreateDirectory(Path.GetDirectoryName(GetNewName(file,settings,".html"))!);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user