diff --git a/Yavsc/Helpers/TagHelpers.cs b/Yavsc/Helpers/TagHelpers.cs index 6d9c577b..fca20b37 100644 --- a/Yavsc/Helpers/TagHelpers.cs +++ b/Yavsc/Helpers/TagHelpers.cs @@ -16,10 +16,8 @@ namespace Yavsc.Helpers { private const string MarkdownContentAttributeName = "markdown"; private const string MarkdownMarkAttributeName = "ismarkdown"; - [HtmlAttributeName("site")] public SiteSettings Site { get; set; } - [HtmlAttributeName("base")] public string Base { get; set; } @@ -107,10 +105,12 @@ namespace Yavsc.Helpers var content = await GetContent(output); var markdown = content; - var basePath = Base?.StartsWith("~") ?? false ? - Constants.UserFilesDir + - Base.Substring(1) : Base; - var html = Markdown(markdown, basePath); + + var htbase = Base; + + + var html = Markdown(markdown, htbase); + output.Content.SetHtmlContent(html ?? ""); } private async Task GetContent(TagHelperOutput output) diff --git a/Yavsc/Settings/ThirdPartyFiles.cs b/Yavsc/Settings/ThirdPartyFiles.cs index a5affec3..b076c7ed 100644 --- a/Yavsc/Settings/ThirdPartyFiles.cs +++ b/Yavsc/Settings/ThirdPartyFiles.cs @@ -4,5 +4,8 @@ namespace Yavsc public class ThirdPartyFiles { public string DirName { get; set; } public string Quota { get; set; } + public string Blog { get; set; } + public string Bills { get; set; } + } } \ No newline at end of file diff --git a/Yavsc/Startup/Startup.FileServer.cs b/Yavsc/Startup/Startup.FileServer.cs index b5f6db2a..f40ae025 100644 --- a/Yavsc/Startup/Startup.FileServer.cs +++ b/Yavsc/Startup/Startup.FileServer.cs @@ -29,7 +29,7 @@ namespace Yavsc { FileProvider = new PhysicalFileProvider(rootPath), RequestPath = new PathString("/" + siteSettings.UserFiles.DirName), - EnableDirectoryBrowsing = false + EnableDirectoryBrowsing = env.IsDevelopment() }); app.UseStaticFiles(); } diff --git a/Yavsc/Views/Blogspot/Details.cshtml b/Yavsc/Views/Blogspot/Details.cshtml index 73f96ad1..621bf54b 100644 --- a/Yavsc/Views/Blogspot/Details.cshtml +++ b/Yavsc/Views/Blogspot/Details.cshtml @@ -30,8 +30,7 @@ @SR["Content"]
-
+
@SR[Html.DisplayNameFor(model => model.Modified)] diff --git a/Yavsc/Views/Blogspot/Edit.cshtml b/Yavsc/Views/Blogspot/Edit.cshtml index c003784b..77877002 100644 --- a/Yavsc/Views/Blogspot/Edit.cshtml +++ b/Yavsc/Views/Blogspot/Edit.cshtml @@ -5,6 +5,7 @@ } @section header{ + @@ -32,16 +33,13 @@ - -} - -@section scripts{ - @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } + @Html.Partial("_ValidationScriptsPartial") } +

@SR["Blog post edition"]

@Model.Title