allFrontMatterLines
This commit is contained in:
@ -10,7 +10,7 @@ internal abstract class MarkDown
|
||||
|
||||
// ...
|
||||
|
||||
internal static List<string> GetFrontMatter(long ticks, string fullName, string lowerHyphenFullName, Models.GenealogicalDataCommunication genealogicalDataCommunication)
|
||||
internal static List<string> GetFrontMatterLines(long ticks, string fullName, string lowerHyphenFullName, Models.GenealogicalDataCommunication genealogicalDataCommunication)
|
||||
{
|
||||
List<string> results = new();
|
||||
string afterTrim;
|
||||
@ -33,14 +33,12 @@ internal abstract class MarkDown
|
||||
results.Insert(0, $"title: \"{fullName}\"");
|
||||
results.Insert(0, "type: \"person\"");
|
||||
results.Add("draft: false");
|
||||
results.Insert(0, "---");
|
||||
results.Add($"{nameof(lowerHyphenFullName)}: \"{lowerHyphenFullName}\"");
|
||||
results.Add("---");
|
||||
}
|
||||
return results;
|
||||
}
|
||||
|
||||
internal static void WriteFile(string personKeyFormatted, long ticks, List<GenealogicalDataCommunicationRelation> genealogicalDataCommunicationRelations, string a2PeopleContentDirectory, Calendar calendar, string pattern, ReadOnlyDictionary<string, string> personKeyFormattedToPersonFullName, ReadOnlyDictionary<int, List<GenealogicalDataCommunicationRelation>> familyIndexToCollection, Models.GenealogicalDataCommunication genealogicalDataCommunication, string fullName, string lowerHyphenFullName, List<string> frontMatter)
|
||||
internal static void WriteFile(string personKeyFormatted, long ticks, List<GenealogicalDataCommunicationRelation> genealogicalDataCommunicationRelations, string a2PeopleContentDirectory, Calendar calendar, string pattern, ReadOnlyDictionary<string, string> personKeyFormattedToPersonFullName, ReadOnlyDictionary<int, List<GenealogicalDataCommunicationRelation>> familyIndexToCollection, Models.GenealogicalDataCommunication genealogicalDataCommunication, string fullName, string lowerHyphenFullName, List<string> frontMatterLines)
|
||||
{
|
||||
string decade;
|
||||
string? personFullName;
|
||||
@ -55,7 +53,9 @@ internal abstract class MarkDown
|
||||
const string person = "person";
|
||||
DateTime dateTime = new(ticks);
|
||||
List<GenealogicalDataCommunicationRelation>? relations;
|
||||
lines.AddRange(frontMatter);
|
||||
lines.Add("---");
|
||||
lines.AddRange(frontMatterLines);
|
||||
lines.Add("---");
|
||||
lines.Add(string.Empty);
|
||||
lines.Add($"# {fullName}");
|
||||
lines.Add(string.Empty);
|
||||
|
Reference in New Issue
Block a user