Skip to content

about 页面重复扫描 translations 集合 #43

Description

@SongshGeo

src/pages/[lang]/about/index.astro

const site = await getSiteConfig(lang);   // 内部又调了一次 getSiteOverlay
const overlay = await getSiteOverlay(lang);

getSiteConfig() 内部已经 await getSiteOverlay(lang),所以每个 about 页面
会把整个 translations 集合 getCollection 两遍(zh/en 共四遍)。

功能正确,纯属浪费。建议 getSiteConfig 直接把 overlay 一并返回,
调用方就不必再取一次。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech-debt技术债 / 重构

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions