Skip to content
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

docs: Adds cookbook #7301

Merged
merged 4 commits into from May 7, 2024
Merged

Conversation

vikram-dagger
Copy link
Contributor

@vikram-dagger vikram-dagger commented May 7, 2024

This commit adds a cookbook with sample code for common use cases. It only contains a few examples right now, to set up the initial structure, formatting etc. For the same reason, the navbar entry is hidden until we have more content.

Preview URL: https://deploy-preview-7301--devel-docs-dagger-io.netlify.app/manuals/developer/cookbook
Preview URL for local testing: /manuals/developer/cookbook

Signed-off-by: Vikram Vaswani <[email protected]>
@@ -567,6 +567,11 @@ module.exports = {
}
]
},
// {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend we keep this hidden until we have more content in the cookbook. See top-level comment for how to view it for testing.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to merge this PR and we can contribute sections in separate PRs and then uncomment this in a follow up PR after?
cc @levlaz

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to merge this PR and we can contribute sections in separate PRs and then uncomment this in a follow up PR after? cc @levlaz

Yes, exactly

Signed-off-by: Vikram Vaswani <[email protected]>
Signed-off-by: Vikram Vaswani <[email protected]>
@vikram-dagger vikram-dagger requested a review from TomChv May 7, 2024 11:42
Signed-off-by: Vikram Vaswani <[email protected]>
Copy link
Member

@gerhard gerhard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

</TabItem>
</Tabs>

Example usage:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a change from the previous cookbook. WDYT of it?

Copy link
Contributor

@kpenfound kpenfound May 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's necessary, but I'm not strongly against it either. It may not make sense for certain examples (which is fine) and may lead us to try to show cli-oriented examples in cookbook (which is avoidable)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your thoughts @helderco @levlaz @shykes ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kind of like it, but I think we should think about adding two parts here.

  1. Example SDK usage (maybe even show how to use in other SDKs)
  2. Example CLI usage (or make it clear that is what is happening)

I think this is especially important because there are some things that are different between CLI and SDK. For example, in go, optional args are not actually optional if you are using them via the SDK.

Risk here is that it is possible this becomes too verbose.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK we are de-emphasizing the SDK use case, so IMHO we should not show that part for the moment.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I vote ship it and we can start the migration and make a decision as we go

@vikram-dagger vikram-dagger merged commit f67cc79 into dagger:main May 7, 2024
45 checks passed
vikram-dagger added a commit to vikram-dagger/dagger that referenced this pull request May 8, 2024
* docs: Adds cookbook

Signed-off-by: Vikram Vaswani <[email protected]>

* Lint fixes

Signed-off-by: Vikram Vaswani <[email protected]>

* Lint fix

Signed-off-by: Vikram Vaswani <[email protected]>

* Updated headings

Signed-off-by: Vikram Vaswani <[email protected]>

---------

Signed-off-by: Vikram Vaswani <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants