Skip to content

Commit 0b30f51

Browse files
committed
Minor bug fixes
1 parent f1d8809 commit 0b30f51

File tree

4 files changed

+13
-7
lines changed

4 files changed

+13
-7
lines changed

Diff for: Blogifier.Core/Controllers/Api/PostsController.cs

+8-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,10 @@ public async Task<IActionResult> Index([FromBody]PostEditModel model)
8383
_db.BlogPosts.Add(bp);
8484
if (model.Publish)
8585
{
86-
await Notify(bp.Title, bp.Description);
86+
if (_email.Enabled)
87+
{
88+
await Notify(bp.Title, bp.Description);
89+
}
8790
}
8891
}
8992
else
@@ -101,7 +104,10 @@ public async Task<IActionResult> Index([FromBody]PostEditModel model)
101104
{
102105
if(bp.Published == DateTime.MinValue)
103106
{
104-
await Notify(bp.Title, bp.Description);
107+
if (_email.Enabled)
108+
{
109+
await Notify(bp.Title, bp.Description);
110+
}
105111
}
106112
bp.Published = SystemClock.Now();
107113
}

Diff for: Blogifier.Web/Views/Blogifier/Themes/OneFour/_Shared/_Header.cshtml

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212

1313
<header class="blog-header d-flex flex-column">
1414
<div class="container d-flex">
15-
<a href="~/@logoUrl" class="blog-logo my-auto d-flex">
15+
<a href="~/" class="blog-logo my-auto d-flex">
1616
<img src="@logoImg" alt="@ApplicationSettings.Title" class="my-auto" />
17-
@if (@ViewData["bodyClass"] != "home") {
17+
@if(ViewData["bodyClass"] != null && ViewData["bodyClass"].ToString() != "home") {
1818
<span class="my-auto">@ApplicationSettings.Title</span>
1919
}
2020
</a>

Diff for: Blogifier.Web/appsettings.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
"Description": "Cross-platform ASP.NET Core blogging application",
1717
"BlogAdminFolder": "Views/Blogifier/Admin",
1818
"BlogTheme": "OneFour",
19-
"ProfileAvatar": "/blogifier/admin/onethree/img/avatar.png",
19+
"ProfileAvatar": "/blogifier/admin/img/avatar.png",
2020
"SendGridEmail": "",
2121
"SendGridApiKey": "",
22-
"Demo": "true",
22+
"Demo": "false",
2323
"BlogStorageFolder": "data"
2424
}
2525
}

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Blogifier is simple, beautiful, light-weight open source blog written in .NET Co
1212

1313
1. Clone or download source code
1414
2. Run it in Visual Studio or VS Code
15-
3. Log in (admin@us.com / Blog@fier1)
15+
3. Register new user
1616
4. Write and publish posts
1717

1818
## Demo site

0 commit comments

Comments
 (0)