-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to latest Statiq packages + search index fix
- Loading branch information
Showing
8 changed files
with
70 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,3 +44,4 @@ Gemfile.lock | |
.sass-cache | ||
*~ | ||
.jekyll-cache | ||
cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
using Statiq.Common; | ||
|
||
namespace MemoirsTheme.Modules | ||
{ | ||
/// <summary> | ||
/// A search item for a document. | ||
/// </summary> | ||
public class LunrIndexDocItem | ||
{ | ||
/// <summary> | ||
/// The document the search item points to. | ||
/// </summary> | ||
public IDocument Document { get; set; } | ||
|
||
/// <summary> | ||
/// The title of the search item. | ||
/// </summary> | ||
public string Title { get; set; } | ||
|
||
/// <summary> | ||
/// The description of the search item. | ||
/// </summary> | ||
public string Description { get; set; } | ||
|
||
/// <summary> | ||
/// The content of the search item. | ||
/// </summary> | ||
public string Content { get; set; } | ||
|
||
/// <summary> | ||
/// Any tags for the search item. | ||
/// </summary> | ||
public string Tags { get; set; } | ||
|
||
/// <summary> | ||
/// Creates the search item. | ||
/// </summary> | ||
/// <param name="document">The document this search item should point to.</param> | ||
/// <param name="title">The title of the search item.</param> | ||
/// <param name="content">The search item content.</param> | ||
public LunrIndexDocItem(IDocument document, string title, string content) | ||
{ | ||
Document = document; | ||
Title = title; | ||
Content = content; | ||
Tags = ""; | ||
Description = ""; | ||
} | ||
|
||
/// <summary> | ||
/// Gets a link to the search item result. | ||
/// </summary> | ||
/// <param name="context">The current execution context.</param> | ||
/// <param name="includeHost"><c>true</c> to include the hostname, <c>false otherwise</c>.</param> | ||
/// <returns>A link to the search item.</returns> | ||
public string GetLink(IExecutionContext context, bool includeHost) => | ||
context.GetLink(Document, includeHost); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters