public void NewPost(string title) { var postHeader = new PostHeader(Config.Author, DateTime.UtcNow, title); string fileName = GetCleanFileName(postHeader); File.WriteAllText(fileName, postHeader.Serialize()); WriteLine($"code ./{fileName}"); }
public Post(PostHeader postHeader, string htmlString, string descriptionHtmlString) { this.Header = postHeader; this.HtmlString = htmlString; this.DescriptionHtmlString = descriptionHtmlString; }
public string GetCleanFileName(PostHeader postHeader) { return $"{Config.PostSubDir}/{postHeader.CleanTitle}.md"; }