mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-24 20:22:51 +08:00

* Adding a dark mode * Adding reference for types to summary pages * Adding API Reference * Adding modifiers to methods/fields/etc * Minimizing files input * Caching a lot of the output pages * Cache only for each execution * Adding API references to existing docs
33 lines
923 B
C#
33 lines
923 B
C#
using Docs.Models;
|
|
using Docs.Modules;
|
|
using Statiq.Common;
|
|
using Statiq.Core;
|
|
|
|
namespace Docs.Pipelines
|
|
{
|
|
public class EmojiPipeline : Pipeline
|
|
{
|
|
public EmojiPipeline()
|
|
{
|
|
InputModules = new ModuleList
|
|
{
|
|
new ExecuteConfig(
|
|
Config.FromContext(_ => {
|
|
return new ReadEmbedded(
|
|
typeof(EmojiPipeline).Assembly,
|
|
"Docs/src/Data/emojis.json");
|
|
}))
|
|
};
|
|
|
|
ProcessModules = new ModuleList
|
|
{
|
|
new ExecuteConfig(
|
|
Config.FromDocument(async (doc, _) =>
|
|
{
|
|
var data = Emoji.Parse(await doc.GetContentStringAsync());
|
|
return data.ToDocument(Constants.Emojis.Root);
|
|
}))
|
|
};
|
|
}
|
|
}
|
|
} |