#docs: initiate Elixir quickstart documen...
1 messages · Page 1 of 1 (latest)
It works with snippet linked by ids: https://github.com/dagger/dagger/blob/7be5ac8dc658b51f8d2139782ae869f3028c25fa/docs/current/quickstart/593914-hello.mdx#L15-L19
@sweet crown do you knows if we can include Elixir snippet?
If so, is there any documentation explaining how we can add new snippets that work on our playground?
Because I see that everything is executed on play.dagger.cloud but I didn't find a way to code in another language than GQL
Hey!
Yep, you should be able to, but @last prawn worked on creating snippets, so I'm not completely sure on how the flow works.
Here's the file that retrieves an ID that should be inserted into the object in the link you mentioned.
That object is for creating a new tab in the iframe wrapper, to select between iframes (each lang is a different iframe, with the IDs in that object being the path of the iframe src: play.dagger.cloud/embed/{id})
Basically, we create a dagger env with the deps required to run each language, and there's a repo with the app being used https://github.com/dagger/hello-dagger
So for each step of the quickstart, you'll need to generate a new ID with the GraphQL specific to each step.
For this, you'll need to create a new elixir entry in the bash script.
It's documented here https://github.com/dagger/dagger/blob/main/docs/STYLE_GUIDE.md#api-playground-embeds
However note that the script we are using to create embeds and IDs for the quickstart create_embed_qs doesn't support elixir yet. It would need to be updated for this. @marsh crescent is the person to coordinate with for changes to that script.
I didn't realize that we already have this documentation! Thank you you all. ❤️
@clear pike re-reading the discussion above and in the context of your PR https://github.com/dagger/dagger/pull/5648, I think I may have misunderstood what you were originally asking for and therefore directed you the wrong way. Apologies if this was the case!
- I was under the impression you wanted to create an embeddable Elixir snippet for our quickstart, similar to what we have at https://docs.dagger.io/quickstart/593914/hello. In this case, you would use
create_embed_qs.sh. - However if you wish to create embeddable Elixir snippets with custom (non-quickstart) code for other pages, then you should use
create_embed.sh. - This is mentioned in the style guide linked above (step 7)
# for embeds apart from quickstart embeds
TOKEN=$TOKEN ./create_embed.sh YOUR-SNIPPET-FILE
# for quickstart embeds
TOKEN=$TOKEN ./create_embed_qs.sh YOUR-SNIPPET-FILE
- As additional context: the reason we have two scripts
create_embedandcreate_embed_qsis because the quickstart uses our examplehello-daggerapp repo and therefore the embed scriptcreate_embed_qs.shneeds to perform some additional tasks to set up that repo prior to executing the snippet. This is however not needed in the case ofcreate_embed.sh.
I'm mentioning this because I reviewed your PR above and saw that your sample Elixir code snippet is not related to the quickstart, but the script modified iscreate_embed_qs.sh, which is intended only for quickstart embeds. Hope this helps, feel free to ping me if you need further information.
So I think we need to modify both for writing quickstart guide, right?
It depends on your intentions. If you are planning to modify/add embeds to the Dagger quickstart, then modify create_embed_qs.sh. For adding any other embed, modify create_embed.sh.
I have plan to tackle Elixir quickstart guide (https://github.com/dagger/dagger/pull/5620). The create_embed_qs.sh seems necessary.
@marsh crescent Do you know if Elixir is supported on Dagger playground? If not, what can we do to support it?
Hey Tom! Not yet. I'll work on that tomorrow
Thank you. 🙂
Hi @clear pike. We discussed this internally and unfortunately we won't be able to add Elixir support to the API Playground / Dagger Quickstart embeds for now. At this time, we are not adding any experimental SDKs to those assets.
However, we'd love your support on the Elixir SDK docs (that you already started building) since those will be a great resource for the community to use https://github.com/dagger/dagger/pull/5530
/cc @hybrid dock @marsh crescent
Totally understand. I will pause the quickstart document for now. 🙂