ssg: StaticSiteClient: GetFileNameForPost initial impl

This commit is contained in:
Nick Vella 2019-07-02 18:40:40 +10:00
parent b0a78d7085
commit 0125c52198
1 changed files with 7 additions and 0 deletions

View File

@ -182,6 +182,13 @@ namespace OpenLiveWriter.BlogClient.Clients
PublishCommand = blogCredentials.GetCustomValue(CONFIG_PUBLISH_COMMAND);
}
private string GetFileNameForPost(BlogPost post, bool newPost)
{
var safeTitle = WEB_UNSAFE_CHARS.Replace(post.Title.ToLower(), "").Replace(" ", "-");
return $"{post.DatePublished.ToString("yyyy-MM-dd")}-{safeTitle}";
}
/// <summary>
/// Always false. It is not possible to perform remote detection on a static site, as
/// it may not be published yet, or published to a web location.