Skip to content

Commit

Permalink
[index] add support for gravatar attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
rmannibucau committed Jul 31, 2024
1 parent f5f1e90 commit 77d244a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/SBSharp.Core/SBSharp/Core/Command/BuildCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ var page in pages
"index-title" => header.Title,
"index-body" => page.Item2.Body(),
"index-description" => description,
"index-gravatar" => page.Item2.Gravatar,
"index-publishedon"
=> new DateTime(page.Item2.PublishedOn, TimeOnly.MinValue).ToString(
"yyyy-MM-ddTHH:mm:ss.fffK"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ public class IndexationConfiguration
"List of indexed data, they are all read in page attributes except "
+ "`index-title` which uses the document title - if the attribute value is not false which disables the virtual attribute and "
+ "`index-body` which is the document in html and `index-publishedon` which is the publication date in ISO8601 format. "
+ "For convenience, `index-gravatar` computes the author gravatar URL. "
+ "Note that `index-description` can be replaced by `description` if it does not exist. "
+ "Finally, on client side - in the JSON - the `index-` prefix is always stripped."
)]
Expand Down

0 comments on commit 77d244a

Please sign in to comment.