Conversation
|
Thanks, @jacobpake! We could also update {
"scripts": {
"dev:anonymous": "cross-env ANONYMOUS=true vite dev",
"build:anonymous": "cross-env ANONYMOUS=true vite build"
}
}This requires adding Additionally, we should update |
| export const public_config = { | ||
| name: "PurePy", | ||
| logo: logo, | ||
| github: "https://github.com/pure-py/pure-py-spec", | ||
| spec: "https://github.com/pure-py/pure-py-spec/releases/latest", | ||
| favicon: "/favicon.png", | ||
| } as const; | ||
|
|
||
| const NO_LOGO = | ||
| "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; | ||
|
|
||
| export const anon_config = { | ||
| name: "This Project", | ||
| logo: NO_LOGO, | ||
| github: "https://github.com", | ||
| spec: "https://github.com", // we need an anoymous spec | ||
| favicon: NO_LOGO, | ||
| }; |
There was a problem hiding this comment.
Could we define a shared SiteConfig type and use satisfies SiteConfig for both configuration objects, public_config and anon_config?
There was a problem hiding this comment.
Is there any benefit in doing that?
There was a problem hiding this comment.
I’d argue it gives us compile-time shape validation and safer refactors, all while preserving exact literal types—so I see it as a nice-to-have for safety and maintainability.
Is there a benefit in doing this vs just setting the environment variable? Is it worth the dependency? |
Adding |
Supports an
ANONYMOUS=trueenvironment variable at build time to produce a website with any identifying features removed