public void GenerateEntryFor11ty_Test(string entryRoot, string title) { entryRoot = ProgramAssemblyUtility.GetPathFromAssembly(this.GetType().Assembly, entryRoot); var entry = MarkdownEntryUtility.GenerateEntryFor11ty(entryRoot, title); Assert.NotNull(entry); Assert.True(File.Exists(ProgramFileUtility.GetCombinedPath(entryRoot, $"{entry.FrontMatter.GetValue<string>("clientId")}.md"))); }
/// <summary> /// Generates the <see cref="MarkdownEntry"/> /// at the conventional drafts root. /// </summary> /// <param name="entryDraftsRootInfo">The entry drafts root information.</param> /// <param name="title">The title.</param> /// <exception cref="NullReferenceException">The expected {nameof(entry)} is not here.</exception> public static void GenerateEntry(DirectoryInfo entryDraftsRootInfo, string title) { var entry = MarkdownEntryUtility.GenerateEntryFor11ty(entryDraftsRootInfo.FullName, title); if (entry == null) { throw new NullReferenceException($"The expected {nameof(entry)} is not here."); } var clientId = entry.FrontMatter.GetValue <string>("clientId"); traceSource?.WriteLine($"{nameof(MarkdownEntryActivity)}: Generated entry: {clientId}"); }