-
Notifications
You must be signed in to change notification settings - Fork 6
[2nd Attempt] Remove samples from docs site #162
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2nd Attempt] Remove samples from docs site #162
Conversation
To me, this makes sense. Looks like the main diff is that it keeps the samples build script, is that right @jordanstephens ? That should solve the issue we had. |
Yep that's exactly right. The corp website requests samples from the docs website, so this PR removes the presentation of the samples in the docs, but continues building them so the corp website can fetch them. See https://github.com/DefangLabs/defang-mvp/blob/37d84acb9fbdd03822051058084d7c7d665a7e8c/website/src/modules/samples/lib/fetch-samples/fetch-samples.ts#L16 In the future, we should cut the docs website out of the loop, but this will get things moving for now. |
Agreed. We had talked about it previously, but ended up deciding that it would be simpler at that time to just roll with it. I think |
Sure, we may be able to set up a github pages site for the samples repo to host a json file that we build in an action on merge. |
Exactly. I think that makes a lot more sense. I'll add an issue for it. |
Reverts #159
First attempt #137
Closes https://github.com/DefangLabs/defang-mvp/issues/825
Last time we deployed this, the samples disappeared from the marketing site. The intention was to keep them there, but remove them from the docs site.
Todo
The marketing website fetches samples from the docs site at
https://docs.defang.io/samples-v2.json
[1]samples-v2.json
.We accomplish this by preserving the
scripts/prep-samples.js
file, which builds/static/samples-v2.json
.We should probably move this sort of sample processing elsewhere because there is no reason for the docs site to be part of this process, but for now, I'll leave it in place.