Final tweaks for alpha01
Bit Badger Solutions is now live on this version
This commit is contained in:
parent
dec45fddba
commit
96e7a4c23b
|
@ -183,7 +183,8 @@ module private Helpers =
|
||||||
seq {
|
seq {
|
||||||
KeyValuePair.Create ("", $"- Default (single-{typ}) -")
|
KeyValuePair.Create ("", $"- Default (single-{typ}) -")
|
||||||
yield!
|
yield!
|
||||||
Directory.EnumerateFiles $"themes/{(WebLogCache.get ctx).themePath}/"
|
Path.Combine ("themes", (WebLogCache.get ctx).themePath)
|
||||||
|
|> Directory.EnumerateFiles
|
||||||
|> Seq.filter (fun it -> it.EndsWith $"{typ}.liquid")
|
|> Seq.filter (fun it -> it.EndsWith $"{typ}.liquid")
|
||||||
|> Seq.map (fun it ->
|
|> Seq.map (fun it ->
|
||||||
let parts = it.Split Path.DirectorySeparatorChar
|
let parts = it.Split Path.DirectorySeparatorChar
|
||||||
|
@ -428,7 +429,9 @@ module Page =
|
||||||
|> Seq.map (fun it -> { name = fst it; value = snd it })
|
|> Seq.map (fun it -> { name = fst it; value = snd it })
|
||||||
|> Seq.sortBy (fun it -> $"{it.name.ToLower ()} {it.value.ToLower ()}")
|
|> Seq.sortBy (fun it -> $"{it.name.ToLower ()} {it.value.ToLower ()}")
|
||||||
|> List.ofSeq
|
|> List.ofSeq
|
||||||
revisions = revision :: page.revisions
|
revisions = match page.revisions |> List.tryHead with
|
||||||
|
| Some r when r.text = revision.text -> page.revisions
|
||||||
|
| _ -> revision :: page.revisions
|
||||||
}
|
}
|
||||||
do! (match model.pageId with "new" -> Data.Page.add | _ -> Data.Page.update) page conn
|
do! (match model.pageId with "new" -> Data.Page.add | _ -> Data.Page.update) page conn
|
||||||
if updateList then do! PageListCache.update ctx
|
if updateList then do! PageListCache.update ctx
|
||||||
|
@ -588,7 +591,7 @@ module Post =
|
||||||
| Some post ->
|
| Some post ->
|
||||||
let revision = { asOf = now; text = MarkupText.parse $"{model.source}: {model.text}" }
|
let revision = { asOf = now; text = MarkupText.parse $"{model.source}: {model.text}" }
|
||||||
// Detect a permalink change, and add the prior one to the prior list
|
// Detect a permalink change, and add the prior one to the prior list
|
||||||
let page =
|
let post =
|
||||||
match Permalink.toString post.permalink with
|
match Permalink.toString post.permalink with
|
||||||
| "" -> post
|
| "" -> post
|
||||||
| link when link = model.permalink -> post
|
| link when link = model.permalink -> post
|
||||||
|
@ -607,7 +610,9 @@ module Post =
|
||||||
|> List.ofSeq
|
|> List.ofSeq
|
||||||
categoryIds = model.categoryIds |> Array.map CategoryId |> List.ofArray
|
categoryIds = model.categoryIds |> Array.map CategoryId |> List.ofArray
|
||||||
status = if model.doPublish then Published else post.status
|
status = if model.doPublish then Published else post.status
|
||||||
revisions = revision :: page.revisions
|
revisions = match post.revisions |> List.tryHead with
|
||||||
|
| Some r when r.text = revision.text -> post.revisions
|
||||||
|
| _ -> revision :: post.revisions
|
||||||
}
|
}
|
||||||
do! (match model.postId with "new" -> Data.Post.add | _ -> Data.Post.update) post conn
|
do! (match model.postId with "new" -> Data.Post.add | _ -> Data.Post.update) post conn
|
||||||
do! addMessage ctx { UserMessage.success with message = "Post saved successfully" }
|
do! addMessage ctx { UserMessage.success with message = "Post saved successfully" }
|
||||||
|
|
|
@ -1,13 +1,7 @@
|
||||||
{
|
{
|
||||||
"RethinkDB": {
|
"RethinkDB": {
|
||||||
"hostname": "data02.bitbadger.solutions",
|
"hostname": "data02.bitbadger.solutions",
|
||||||
"database": "myWebLog-dev"
|
"database": "myWebLog"
|
||||||
},
|
|
||||||
"Logging": {
|
|
||||||
"LogLevel": {
|
|
||||||
"RethinkDB.DistributedCache": "Debug",
|
|
||||||
"RethinkDb.Driver": "Debug"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"Generator": "myWebLog 2.0-alpha01"
|
"Generator": "myWebLog 2.0-alpha01"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user