Skip to content

Commit 60c7df1

Browse files
Merge pull request #137 from DefangLabs/jordan/deduplicate-samples
deduplicate samples from docs site in favour of mktg site
2 parents a284e50 + 139cead commit 60c7df1

12 files changed

+55
-405
lines changed

blog/2024-02-12-announcing-defang-public-beta.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Ever since we shipped our Private Beta in the summer of 2023, we have been worki
1212

1313
And so, today with our Public Beta, we are addressing this request. With today’s release of [Defang BYOC](https://docs.defang.io/docs/concepts/defang-byoc) (Bring-your-own-Cloud), you can now enjoy all the benefits of Defang **and** deploy applications to your own AWS account! Our Private Beta experience is still available as [Defang Playground](https://docs.defang.io/docs/concepts/defang-playground) for you to quickly and easily prototype applications and deploy them to our hosted environment.
1414

15-
You can learn more about Defang [here](https://docs.defang.io/docs/intro). Also check out our [tutorials](https://docs.defang.io/docs/category/tutorials), [samples](https://docs.defang.io/docs/samples), and [FAQ](https://docs.defang.io/docs/category/faq) to know more.
15+
You can learn more about Defang [here](https://docs.defang.io/docs/intro). Also check out our [tutorials](https://docs.defang.io/docs/category/tutorials), [samples](https://defang.io/#samples), and [FAQ](https://docs.defang.io/docs/category/faq) to know more.
1616

1717
**Try the Public Beta!**
1818

blog/2024-07-31-july-product-updates-2.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,20 @@ Hey folks! We can’t believe a month has gone by already, time flies when you
1111

1212
1. As our user-base grows, we wanted to make sure we’re able to scale our [Playground](https://docs.defang.io/docs/concepts/defang-playground) environment to be able to handle the load. This involved being able to shard the workload across multiple ALBs and being able to dynamically move some workloads across shards where possible. With these changes, we are now able handle a large number of concurrent users comfortably. The only noticeable change in behavior you would see is that Defang will now ask you to “`compose down`” your previous project before you are able to deploy a new project on Playground.
1313

14-
2. The major news this month was the introduction of our “`debug`” functionality. The motivation for this feature was that while the Defang experience is amazing when everything goes smoothly, we saw users (including our own interns who are helping write all those [samples](https://docs.defang.io/docs/samples)) struggle when they hit an error. The underlying reason for the error could come from a variety of sources: an error in the developer’s application (including in their Dockerfile or Compose file), an issue in the way Defang is processing the application, or an issue in the underlying cloud platform (currently, AWS). To the developer, it is often not obvious what the issue is or how to fix it. That got us thinking how we could make this debugging experience “radically simpler” and thus the idea for `defang debug` was born.
15-
14+
2. The major news this month was the introduction of our “`debug`” functionality. The motivation for this feature was that while the Defang experience is amazing when everything goes smoothly, we saw users (including our own interns who are helping write all those [samples](https://defang.io/#samples)) struggle when they hit an error. The underlying reason for the error could come from a variety of sources: an error in the developer’s application (including in their Dockerfile or Compose file), an issue in the way Defang is processing the application, or an issue in the underlying cloud platform (currently, AWS). To the developer, it is often not obvious what the issue is or how to fix it. That got us thinking how we could make this debugging experience “radically simpler” and thus the idea for `defang debug` was born.
15+
1616
Now (with CLI v0.5.37 if your application encounters an error that leads to a failed deployment, a failed health-check, or a run-time error, Defang will automatically detect the issue. It will then offer to help you debug it by running the `defang debug` command. If you choose to proceed, Defang will apply an LLM model to try to determine the precise cause of the error, with the context of your application source, logs, error code etc. And it will try to come up with one or more actionable insights on how to fix the error. For an example, see the case below:
17-
18-
19-
17+
18+
19+
2020
Behind the scenes, Defang is having a conversation on your behalf with the LLM to narrow down to the cause of the error. We would love for you to try the `debug` feature and give us your feedback so we can improve it further. One future improvement already on our list is the ability to, with user consent, automatically apply a chosen fix and re-try. We are also looking for way to improve the range of failures we are able to diagnose successfully.
2121

2222
## Townhall
2323

2424
If you're excited about what's coming next and want to hear more about our vision for the future, join us for our Townhall on August 21st. We'll be sharing more about our roadmap and what we're working on next. We'll also be making sure to take time to answer any questions you have, hear your feedback, and learn more about what you want from Defang!
2525

2626
**[Register here](https://lu.ma/rlj13eq5)**
27-
27+
2828
---
2929

3030
We’re excited to keep improving Defang to make it the easiest way for you to Develop, Deploy, and Debug cloud application. Stay tuned for more updates next month.
31-

docs/intro/features.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Defang provides a streamlined experience to develop, deploy, and debug your clou
1010

1111
### Wide Variety of Use Cases
1212
- Support for [various types of applications](/docs/intro/use-cases): web services and APIs, mobile app backends, ML services, hosting LLMs, etc...
13-
- Support for your programming [language of choice](/docs/samples): Node.js, Python, Golang, or anything else you can package in a Dockerfile
13+
- Support for your programming [language of choice](https://defang.io/#samples): Node.js, Python, Golang, or anything else you can package in a Dockerfile
1414

1515
### AI-Driven Features
1616
- Built-in AI agent to go [from natural language prompt to an outline project](/docs/tutorials/generate-new-code-using-ai)

docs/samples.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

docusaurus.config.js

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,16 @@
11
// @ts-check
22
// Note: type annotations allow type checking and IDEs autocompletion
3-
const {themes} = require('prism-react-renderer');
3+
const { themes } = require('prism-react-renderer');
44
const lightCodeTheme = themes.github;
55
const darkCodeTheme = themes.dracula;
66

7+
const redirects = [
8+
{
9+
from: '/docs/samples',
10+
to: 'https://defang.io/#samples',
11+
},
12+
];
13+
714
/** @type {import('@docusaurus/types').DocusaurusConfig} */
815
const config = {
916
scripts: [
@@ -156,7 +163,15 @@ const config = {
156163
darkTheme: darkCodeTheme,
157164
},
158165
},
159-
plugins: [require.resolve('docusaurus-lunr-search')],
166+
plugins: [
167+
require.resolve('docusaurus-lunr-search'),
168+
[
169+
'@docusaurus/plugin-client-redirects',
170+
{
171+
redirects,
172+
},
173+
],
174+
],
160175
};
161176

162177
module.exports = config;

package-lock.json

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
},
1818
"dependencies": {
1919
"@docusaurus/core": "3.0.0",
20+
"@docusaurus/plugin-client-redirects": "3.0.0",
2021
"@docusaurus/preset-classic": "3.0.0",
2122
"@docusaurus/theme-common": "3.0.0",
2223
"@emotion/react": "^11.11.1",

scripts/prebuild.sh

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,7 @@ if [ -d "../defang" ]; then
1414
else
1515
DEFANG_PATH=$(readlink -f ./defang)
1616
fi
17-
if [ -d "../samples" ]; then
18-
SAMPLES_PATH=$(readlink -f ../samples)
19-
else
20-
SAMPLES_PATH=$(readlink -f ./samples)
21-
fi
2217

2318
cd "$DEFANG_PATH/src/cmd/gendocs" && go run main.go "$CLI_DOCS_PATH"
2419
cd "$CWD"
2520
node scripts/prep-cli-docs.js
26-
node scripts/prep-samples.js "$SAMPLES_PATH/samples"

scripts/prep-samples.js

Lines changed: 0 additions & 93 deletions
This file was deleted.

sidebars.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@
1414
/** @type {import('@docusaurus/plugin-content-docs').SidebarsConfig} */
1515
const sidebars = {
1616
// By default, Docusaurus generates a sidebar from the docs folder structure
17-
docsSidebar: [{type: 'autogenerated', dirName: '.'}],
17+
docsSidebar: [
18+
{type: 'autogenerated', dirName: '.'},
19+
{ type: 'link', label: 'Samples', href: 'https://defang.io/#samples' },
20+
],
1821
};
1922

2023
module.exports = sidebars;

0 commit comments

Comments
 (0)