Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 2 additions & 11 deletions src/main/java/cc/lik/timefactor/process/TimeFactorProcess.java
Original file line number Diff line number Diff line change
Expand Up @@ -276,12 +276,7 @@ private Mono<Void> processTagsSeoData(ITemplateContext context, IModel model,
*/
private Mono<Void> processMomentsSeoData(ITemplateContext context, IModel model,
SeoOverride override) {
// 瞬间路由在上下文中注入了 title 变量,作为 <title> 提取失败时的中间回退
var contextTitle = Optional.ofNullable(context.getVariable("title")).map(Object::toString)
.filter(s -> !s.isBlank()).orElse(null);
// MomentVo 在上下文中是延迟加载的 Mono 对象,无法直接获取 metadata.name,降级使用站点信息
return buildListPageSeoData(context, model, rules -> "/moments", override, contextTitle,
null);
return buildListPageSeoData(context, model, rules -> "/moments", override);
}

/**
Expand All @@ -293,12 +288,8 @@ private Mono<Void> processMomentsSeoData(ITemplateContext context, IModel model,
*/
private Mono<Void> processMomentSeoData(ITemplateContext context, IModel model,
SeoOverride override) {
// 瞬间路由在上下文中注入了 title 变量,作为 <title> 提取失败时的中间回退
var contextTitle = Optional.ofNullable(context.getVariable("title")).map(Object::toString)
.filter(s -> !s.isBlank()).orElse(null);
// MomentVo 在上下文中是延迟加载的 Mono 对象,无法直接获取 metadata.name,降级使用站点信息
return buildListPageSeoData(context, model, rules -> "/moments", override, contextTitle,
null);
return buildListPageSeoData(context, model, rules -> "/moments", override);
}

/**
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/extensions/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,11 @@ spec:
title: 文章归档 - %SITENAME%
description: 文章归档 - %SITEDESC%
- templateId: moments
title: "%TITLE% - %SITENAME%"
description: "%TITLE% - %SITEDESC%"
title: 瞬间 - %SITENAME%
description: 瞬间 - %SITEDESC%
- templateId: moment
title: "%TITLE% - %SITENAME%"
description: "%TITLE% - %SITEDESC%"
title: 瞬间 - %SITENAME%
description: 瞬间 - %SITEDESC%
- templateId: photos
title: 图库 - %SITENAME%
description: 图库 - %SITEDESC%
Expand Down
Loading