Add Open in IDX buttons to astro.new #80
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds an “Open in IDX” button to each template’s card on astro.new.
This works the same way our other services do: you can open a named template using
?on=idx
in the URL, e.g. https://astro.new/basics?on=idx, and uses the templates added in #79. (To test you’ll need the deploy preview URL for now, e.g. https://deploy-preview-80--astro-new.netlify.app/basics?on=idx or click a link in the preview,)The button looks like this:
Clicking this takes you to IDX’s new workspace modal:
The workspace name and the template drop-down are set based on the template selected on astro.new. Users can change these if they want, but don’t need to: they can just click “Create” to get started.