aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md6
-rw-r--r--docs/.vitepress/config.mjs9
-rw-r--r--netlify.toml11
3 files changed, 25 insertions, 1 deletions
diff --git a/README.md b/README.md
index 18dfb366..e63cab79 100644
--- a/README.md
+++ b/README.md
@@ -12,6 +12,12 @@
</div>
+### Try it Online ⚡️
+
+[fakerjs.dev/new](https://fakerjs.dev/new)
+
+[![](https://developer.stackblitz.com/img/open_in_stackblitz.svg)](https://fakerjs.dev/new)
+
## Installation
Please replace your `faker` dependency with `@faker-js/faker`. This is the official, stable fork of Faker.
diff --git a/docs/.vitepress/config.mjs b/docs/.vitepress/config.mjs
index edde35e7..dce68224 100644
--- a/docs/.vitepress/config.mjs
+++ b/docs/.vitepress/config.mjs
@@ -3,7 +3,14 @@ import { apiPages } from './api-pages.mjs';
const nav = [
{ text: 'Guide', link: '/guide/' },
- { text: 'Discord', link: 'https://chat.fakerjs.dev' },
+ {
+ text: 'Ecosystem',
+ items: [
+ { text: 'Discord', link: 'https://chat.fakerjs.dev' },
+ { text: 'StackBlitz', link: 'https://fakerjs.dev/new' },
+ { text: 'Twitter', link: 'https://twitter.com/faker_js' },
+ ],
+ },
// { text: 'Playground', link: '/playground/' },
];
diff --git a/netlify.toml b/netlify.toml
index 2fa70518..e876aa72 100644
--- a/netlify.toml
+++ b/netlify.toml
@@ -1,11 +1,22 @@
[build.environment]
NODE_VERSION = "16"
NPM_FLAGS = "--version" # prevent Netlify npm install
+
+# Documentation
[build]
publish = "docs/.vitepress/dist"
command = "npx pnpm i --store=node_modules/.pnpm-store && npm run docs:build:ci"
+
+# Redirect to Discord server
[[redirects]]
from = "https://chat.fakerjs.dev"
to = "https://discord.com/invite/4qDjAmDj4P"
status = 301
force = true
+
+# Redirect to StackBlitz playground
+[[redirects]]
+ from = "/new"
+ to = "https://stackblitz.com/edit/faker-js-demo?file=index.ts"
+ status = 301
+ force = true