diff --git a/pkg/core/domain.go b/pkg/core/domain.go index 50e96c3..db9452b 100644 --- a/pkg/core/domain.go +++ b/pkg/core/domain.go @@ -83,7 +83,7 @@ func (p *PageDomain) returnMeta(ctx context.Context, owner, repo, branch string, result.Owner = owner result.Repo = repo result.Path = strings.Join(path, "/") - + // todo: 优化保存逻辑 ,减少写入 if err = p.alias.Bind(ctx, meta.Alias, result.Owner, result.Repo, branch); err != nil { zap.L().Warn("alias binding error.", zap.Error(err)) return nil, err diff --git a/pkg/core/meta.go b/pkg/core/meta.go index 02b48d6..5e4db20 100644 --- a/pkg/core/meta.go +++ b/pkg/core/meta.go @@ -180,6 +180,7 @@ func (s *ServerMeta) parsePageConfig(ctx context.Context, meta *PageMetaContent, "targets": alias, }, }) + meta.Alias = alias } return nil // 配置文件不存在不是错误 }