add: 图片处理器
This commit is contained in:
@@ -4,6 +4,7 @@ using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using YaeBlog.Core.Builder;
|
||||
using YaeBlog.Core.Models;
|
||||
using YaeBlog.Core.Processors;
|
||||
using YaeBlog.Core.Services;
|
||||
using YamlDotNet.Serialization;
|
||||
using YamlDotNet.Serialization.NamingConventions;
|
||||
@@ -35,6 +36,10 @@ public static class BlogApplicationBuilderExtension
|
||||
builder.Services.AddSingleton<RendererService>();
|
||||
builder.Services.AddSingleton<EssayContentService>();
|
||||
|
||||
// 设置图像处理器
|
||||
builder.Services.AddSingleton<ImagePostRenderProcessor>();
|
||||
ImagePostRenderProcessor.AddImageApiEndpoint(builder);
|
||||
|
||||
builder.Services.AddHostedService<WebApplicationHostedService>((provider)
|
||||
=> new WebApplicationHostedService(builder.WebApplicationBuilderConfigurations,
|
||||
builder.WebApplicationConfigurations, provider));
|
||||
|
@@ -10,7 +10,7 @@ public static class BlogApplicationExtension
|
||||
{
|
||||
internal static void ConfigureDefaultBlogApplication(this BlogApplication application)
|
||||
{
|
||||
//application.UsePostRenderProcessor<ImagePostRenderProcessor>();
|
||||
application.UsePostRenderProcessor<ImagePostRenderProcessor>();
|
||||
}
|
||||
|
||||
public static void UsePreRenderProcessor<T>(this BlogApplication application)
|
||||
|
Reference in New Issue
Block a user