Class MarkdownEntryUtility
- Namespace
- Songhay.Publications
- Assembly
- Songhay.Publications.dll
Shares routines for MarkdownEntry.
public static class MarkdownEntryUtility
- Inheritance
-
MarkdownEntryUtility
- Inherited Members
Methods
GenerateEntryFor11Ty(string, string)
Generates or overwrites a MarkdownEntry file at the specified entry root.
public static MarkdownEntry GenerateEntryFor11Ty(string entryRoot, string title)
Parameters
entryRoot
stringThe conventional directory of MarkdownEntry drafts.
title
stringsee WithNew11TyFrontMatter(MarkdownEntry?, string?, DateTime, string?, string?).
Returns
GenerateEntryFor11Ty(string?, string?, DateTime, string?, string?)
Generates or overwrites a MarkdownEntry file at the specified entry root.
public static MarkdownEntry GenerateEntryFor11Ty(string? entryRoot, string? title, DateTime inceptDate, string? path, string? tag)
Parameters
entryRoot
stringThe conventional directory of MarkdownEntry drafts.
title
stringsee WithNew11TyFrontMatter(MarkdownEntry?, string?, DateTime, string?, string?).
inceptDate
DateTimesee WithNew11TyFrontMatter(MarkdownEntry?, string?, DateTime, string?, string?).
path
stringsee WithNew11TyFrontMatter(MarkdownEntry?, string?, DateTime, string?, string?).
tag
stringsee WithNew11TyFrontMatter(MarkdownEntry?, string?, DateTime, string?, string?).
Returns
PublishEntryFor11Ty(string, string, string)
Publishes a MarkdownEntry from the specified entry root to the specified presentation root for the eleventy pipeline.
public static string PublishEntryFor11Ty(string entryRoot, string presentationRoot, string fileName)
Parameters
entryRoot
stringThe conventional directory of MarkdownEntry drafts.
presentationRoot
stringThe presentation target directory for publication.
fileName
stringThe name of the MarkdownEntry file in the entry directory.
Returns
- string
Returns the path of the published file.
PublishEntryFor11Ty(string, string, string, DateTime)
Publishes a MarkdownEntry from the specified entry root to the specified presentation root for the eleventy pipeline.
public static string PublishEntryFor11Ty(string entryRoot, string presentationRoot, string fileName, DateTime publicationDate)
Parameters
entryRoot
stringThe conventional directory of MarkdownEntry drafts.
presentationRoot
stringThe presentation target directory for publication.
fileName
stringThe name of the MarkdownEntry file in the entry directory.
publicationDate
DateTimeThe DateTime of publication.
Returns
- string
Returns the path of the published file.
Remarks
When the publication date is one day later or more than the entry incept date new eleventy FrontMatter will be generated and the presentation file will be renamed accordingly.