Skip to content

Commit

Permalink
docs: 📝 Add "Set variable" doc
Browse files Browse the repository at this point in the history
  • Loading branch information
baptisteArno committed Mar 30, 2022
1 parent 21311a6 commit af9e08f
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 13 deletions.
4 changes: 4 additions & 0 deletions apps/docs/docs/editor/blocks/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"label": "Blocks",
"position": 1
}
29 changes: 29 additions & 0 deletions apps/docs/docs/editor/blocks/set-variable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Set variable

The "Set variable" block allows you to set a particular value to a variable.

<img src="/img/blocks/set-variable.png" width="600" alt="Set variable"/>

This value can be any kind of plain text but also **Javascript code**.

It means you can apply operations on existing variables:

```
{{Score}} + 5
```

```
{{Score}} * {{Multiplier}}
```

But also set the variable to the current date for example:

```
new Date()
```

Or a random ID:

```
Math.round(Math.random() * 1000000)
```
4 changes: 2 additions & 2 deletions apps/docs/docs/get-started/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ sidebar_position: 2

# Overview

The best way for me to show you Typebot's simplicity is through a product tour video:
The best way to understand the basic principles of Typebot is by watching the "Get started" video series:

<iframe width="900" height="500" src="https://www.youtube.com/embed/u8FZHvlYviw" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
<iframe width="900" height="500" src="https://www.youtube.com/embed/videoseries?list=PLHpyDlgo4x7NUjF-L5VaYfBPQ03uzf5l3" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
4 changes: 2 additions & 2 deletions apps/docs/docs/get-started/welcome.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ slug: /

# Welcome

[Typebot](https://www.typebot.io) is a conversational form builder that helps you collect more responses compared to other form builders (Typeform, Google Forms, Tally...).
[Typebot](https://www.typebot.io) Typebot is an open-source alternative to Landbot. It allows you to create conversational apps/forms (Lead qualification, Product launch, User onboarding, Customer support), embed them anywhere on your web/mobile apps, and collect results in real-time.

This is the Typebot documentation. It's a great place to find most answers. Please use the search box in the top right or the navigation menu (soon available) on the left-hand side to find the answers you're looking for.

This documentation is a work in progress.

If you can't find what you're looking for, don't hesitate to contact me directly on the web app or at baptiste@typebot.io.
If you can't find what you're looking for, don't hesitate to contact me directly on the web app or at support@typebot.io.
10 changes: 1 addition & 9 deletions apps/docs/docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ module.exports = {
},
items: [
{
href: 'https://github.com/typebot-io/docs',
href: 'https://github.com/baptisteArno/typebot.io/tree/main/apps/docs',
label: 'Contribute',
position: 'right',
},
Expand All @@ -41,10 +41,6 @@ module.exports = {
label: 'Roadmap',
to: 'https://app.typebot.io/feedback',
},
{
label: 'Blog',
to: 'https://www.typebot.io/blog',
},
],
},
{
Expand All @@ -63,10 +59,6 @@ module.exports = {
{
title: 'Company',
items: [
{
label: 'About',
to: 'https://www.typebot.io/about',
},
{
label: 'Terms of Service',
href: 'https://www.typebot.io/terms-of-service',
Expand Down
Binary file added apps/docs/static/img/blocks/set-variable.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

4 comments on commit af9e08f

@vercel
Copy link

@vercel vercel bot commented on af9e08f Mar 30, 2022

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

builder-v2 – ./apps/builder

app.typebot.io
builder-v2-typebot-io.vercel.app
builder-v2-git-main-typebot-io.vercel.app

@vercel
Copy link

@vercel vercel bot commented on af9e08f Mar 30, 2022

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on af9e08f Mar 30, 2022

Choose a reason for hiding this comment

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

@vercel
Copy link

@vercel vercel bot commented on af9e08f Mar 30, 2022

Choose a reason for hiding this comment

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

Successfully deployed to the following URLs:

docs – ./apps/docs

docs-git-main-typebot-io.vercel.app
docs.typebot.io
docs-typebot-io.vercel.app

Please sign in to comment.