Respecting shouldInstallPlugins flag in front matter
This commit is contained in:
@@ -104,6 +104,12 @@ static IReadOnlyCollection<string> ScanDocTargets(string docsRoot)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!frontMatter.TryGetValue("shouldInstallPlugins", out var shouldInstallValue) ||
|
||||||
|
!string.Equals(shouldInstallValue.Trim(), "true", StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (!frontMatter.TryGetValue("path", out var pathValue) || string.IsNullOrWhiteSpace(pathValue))
|
if (!frontMatter.TryGetValue("path", out var pathValue) || string.IsNullOrWhiteSpace(pathValue))
|
||||||
{
|
{
|
||||||
Console.WriteLine($"WARNING: File '{filePath}' has category: docs but missing path.");
|
Console.WriteLine($"WARNING: File '{filePath}' has category: docs but missing path.");
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
---
|
---
|
||||||
category: docs
|
category: docs
|
||||||
path: Obsidian-Plugins\op.docs
|
path: Obsidian-Plugins\op.docs
|
||||||
|
shouldInstallPlugins: true
|
||||||
---
|
---
|
||||||
|
|||||||
Reference in New Issue
Block a user