mirror of
https://github.com/nsnail/spectre.console.git
synced 2025-04-19 02:12:49 +08:00

Added some more context to the docs readme for folks looking to contribute. Also added the license so its clear what the license of the docs site is. As a small tweak I removed a duplicate string value and use the Constant.
34 lines
886 B
C#
34 lines
886 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Docs.Models;
|
|
using Statiq.Common;
|
|
using Statiq.Core;
|
|
|
|
namespace Docs.Pipelines
|
|
{
|
|
public class ColorsPipeline : Pipeline
|
|
{
|
|
public ColorsPipeline()
|
|
{
|
|
InputModules = new ModuleList
|
|
{
|
|
new ExecuteConfig(
|
|
Config.FromContext(ctx => {
|
|
return new ReadWeb(Constants.Colors.Url);
|
|
}))
|
|
};
|
|
|
|
ProcessModules = new ModuleList
|
|
{
|
|
new ExecuteConfig(
|
|
Config.FromDocument(async (doc, ctx) =>
|
|
{
|
|
var data = Color.Parse(await doc.GetContentStringAsync()).ToList();
|
|
return data.ToDocument(Constants.Colors.Root);
|
|
}))
|
|
};
|
|
}
|
|
}
|
|
}
|