ssg: StaticSitePost: add DiskSlug attribute

This commit is contained in:
Nick Vella 2019-07-19 01:12:50 +10:00
parent 85defa0b32
commit 4be51d4646
1 changed files with 13 additions and 5 deletions

View File

@ -71,17 +71,25 @@ namespace OpenLiveWriter.BlogClient.Clients.StaticSite
set => BlogPost.Slug = _safeSlug = value;
}
/// <summary>
/// Confirmed safe slug; does not conflict with any existing post on disk or points to this post on disk.
/// </summary>
private string _safeSlug;
/// <summary>
/// Get the current on-disk slug from the on-disk post with this ID
/// </summary>
public string DiskSlug
{
get => FilePathById == null ? null : GetSlugFromPublishFileName(FilePathById);
}
public DateTime DatePublished
{
get => BlogPost.DatePublished;
set => BlogPost.DatePublished = value;
}
/// <summary>
/// Confirmed safe slug; does not conflict with any existing post on disk or points to this post on disk.
/// </summary>
private string _safeSlug;
/// <summary>
/// Get the on-disk file path for the published post, based on slug
/// </summary>