mirror of
https://github.com/halo-dev/docs.git
synced 2025-10-20 01:17:19 +00:00

为 [Halo 2.17](https://github.com/halo-dev/halo/releases/tag/v2.17.0) 更新文档。 /kind documentation ```release-note None ```
1.3 KiB
1.3 KiB
title, description
title | description |
---|---|
主题端自定义页面内容处理 | 提供扩展主题端自定义页面内容处理的方法,干预自定义页面内容的渲染。 |
主题端自定义页面内容处理扩展点,作用同 主题端文章内容处理 扩展点,只是作用于自定义页面。
public interface ReactiveSinglePageContentHandler extends ExtensionPoint {
Mono<SinglePageContentContext> handle(@NonNull SinglePageContentContext singlePageContent);
@Data
@Builder
class SinglePageContentContext {
private SinglePage singlePage;
private String content;
private String raw;
private String rawType;
}
}
ReactiveSinglePageContentHandler
对应的 ExtensionPointDefinition
如下:
apiVersion: plugin.halo.run/v1alpha1
kind: ExtensionPointDefinition
metadata:
name: reactive-singlepage-content-handler
spec:
className: run.halo.app.theme.ReactiveSinglePageContentHandler
displayName: ReactiveSinglePageContentHandler
type: MULTI_INSTANCE
description: "Provides a way to extend the single page content to be displayed on the theme-side."
即声明 ExtensionDefinition
自定义模型对象时对应的 extensionPointName
为 reactive-singlepage-content-handler
。