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

Code blocks that allow to open them in Val Town should specify the type of a Val #47

Open
Xkonti opened this issue Dec 8, 2023 · 1 comment

Comments

@Xkonti
Copy link
Contributor

Xkonti commented Dec 8, 2023

Let's say there's a code block that presents how to create an API using Hono:

```ts val
import ...
// Do other stuff
```

If user will click "Open in Val Town" the new Val won't be of type HTML introducing more friction and probably confusing some new users.

Solution proposal

If supported in val.town/new it could be achieved by appropriately marking code blocks with meta:

  • val - the existing marking would create regular script vals
  • val-script - explicitly specifies a script val
  • val-http - explicitly specifies http val
  • val-cron - scheduled val
  • val-email - email val

It would be really easy to extract that info in the current code block processor and pass to the URL.

@stevekrouse
Copy link
Contributor

Excellent idea!!!

@stevekrouse stevekrouse added this to Docs Dec 21, 2023
@stevekrouse stevekrouse moved this to Backlog in Docs Dec 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Backlog
Development

No branches or pull requests

2 participants