MCPcopy Create free account
hub / github.com/Effect-TS/effect / resolveConfigYML

Function resolveConfigYML

packages/tools/docgen/src/Core.ts:495–507  ·  view source on GitHub ↗
(content: string)

Source from the content-addressed store, hash-verified

493})
494
495const resolveConfigYML = (content: string) =>
496 Effect.gen(function*() {
497 const config = yield* Configuration.Configuration
498 return content
499 .replace(/^remote_theme:.*$/m, `remote_theme: ${config.theme}`)
500 .replace(
501 /^search_enabled:.*$/m,
502 `search_enabled: ${config.enableSearch}`
503 ).replace(
504 /^ {2}'\S* on GitHub':\n {4}- '.*'/m,
505 ` '${config.projectName} on GitHub':\n - '${config.projectHomepage}'`
506 )
507 })
508
509const getHomepageNavigationHeader = (config: Configuration.ConfigurationShape): string => {
510 const isGitHub = config.projectHomepage.toLowerCase().includes("github")

Callers 1

Core.tsFile · 0.85

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected