From 98661a04d80c5ff9be4ec08533add5d43e9ff969 Mon Sep 17 00:00:00 2001 From: K Heiner Date: Mon, 31 Aug 2026 14:41:07 -0700 Subject: [PATCH] docs(readme): remove duplicate readme.md Updated directus URL Corrected typo in refresh-ssh testCase --- README.md | 7 +- readme.md | 196 ------------------------------------------------------ 2 files changed, 4 insertions(+), 199 deletions(-) delete mode 100644 readme.md diff --git a/README.md b/README.md index dceb99a..508e69b 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ ## Setup Instructions While you can also set up the Visual Editing test website with a Directus instance running in a -[Docker](https://directus.io/docs/getting-started/create-a-project#docker-installation) container, this guide describes +[Docker](https://directus.com/docs/getting-started/create-a-project#docker-installation) container, this guide describes setting up a development environment using the official Directus repository. ### Set up your Directus Dev Instance @@ -67,7 +67,8 @@ setting up a development environment using the official Directus repository. cd template && npm run setup-directus ``` - On Windows, apply the Directus template with the + If that command doesn't work for you (e.g. on Windows, since the script relies on the POSIX-only `source` builtin), + apply the Directus template manually with the [directus-template-cli](https://www.npmjs.com/package/directus-template-cli) to populate your instance with the required schema and content. Run this from the repo root and make sure to replace `` with your Directus URL and `` with the token you generated earlier. @@ -184,7 +185,7 @@ pnpm visual-editing:ssg # http://localhost:3000/blog/why-steampunk-rabbits-are-t http://localhost:3000/blog/why-steampunk-rabbits-are-the-future-of-work - Exactly the same as `refresh` above, except that it is only available for SSG and on a blog page `/blog/[slug]` - Rendering modes: `ssg` - - Search for `testCase === 'refresh-ssg’` + - Search for `testCase === 'refresh-ssg'` ## Credits diff --git a/readme.md b/readme.md deleted file mode 100644 index dceb99a..0000000 --- a/readme.md +++ /dev/null @@ -1,196 +0,0 @@ -# Visual Editing Test Website - -> [!NOTE] -> -> The following test website and guide are intended to be used for testing and development purposes, not for production -> use! - -## Setup Instructions - -While you can also set up the Visual Editing test website with a Directus instance running in a -[Docker](https://directus.io/docs/getting-started/create-a-project#docker-installation) container, this guide describes -setting up a development environment using the official Directus repository. - -### Set up your Directus Dev Instance - -1. Clone the official [Directus GitHub repository](https://github.com/directus/directus), make sure you have the - dependencies installed (`pnpm i`) and build everything (`pnpm build`)! -2. Create a new database (sqlite is recommended for development) and add the env config in `api/.env` - -
Example .env file - - ```sh - PUBLIC_URL=http://localhost:8080 - KEY="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" - SECRET="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" - ADMIN_EMAIL=admin@directus.io - ADMIN_PASSWORD=secret - CACHE_ENABLED=true - CACHE_AUTO_PURGE=true - CACHE_TTL=1d - CORS_ENABLED=true - CORS_ORIGIN=http://localhost:3000 - CONTENT_SECURITY_POLICY_DIRECTIVES__FRAME_SRC=http://localhost:3000 - DB_CLIENT=sqlite3 - DB_FILENAME=db.sqlite3 - ``` - -
- -3. Double check that the following env vars are set: - - ```sh - CONTENT_SECURITY_POLICY_DIRECTIVES__FRAME_SRC=http://localhost:3000 - CACHE_AUTO_PURGE=true - ``` - -4. Run `pnpm --filter api cli bootstrap` to set up the db -5. Run the dev servers: `pnpm --filter api dev` and `pnpm --filter app dev` -6. Login to Directus Studio, create a token for your user and have it ready - -### Set up the test website - -1. Clone this repository, open it in a new window in your code editor on the `main` branch -2. Install dependencies: `pnpm i` -3. Add the env vars to `.env` and make sure to provide `` and the correct `DIRECTUS_URL`. - - ```sh - DIRECTUS_URL=http://localhost:8080 - DIRECTUS_FORM_TOKEN= - DIRECTUS_SERVER_TOKEN= - NUXT_PUBLIC_SITE_URL=http://localhost:3000 - ``` - -4. Now, install the Directus template. - - ```sh - cd template && npm run setup-directus - ``` - - On Windows, apply the Directus template with the - [directus-template-cli](https://www.npmjs.com/package/directus-template-cli) to populate your instance with the - required schema and content. Run this from the repo root and make sure to replace `` with your Directus - URL and `` with the token you generated earlier. - - ```sh - npx directus-template-cli@latest apply -p --templateLocation=./template --templateType=local --directusUrl= --directusToken= - ``` - -### Run the test website - -Run the test website with `pnpm visual-editing:ssr--refresh`. - -> [!NOTE] -> -> See the description of the different “Test Modes” below - -### Develop against a local `@directus/visual-editing` source - -By default, `pnpm i` pulls the latest published `@directus/visual-editing` from npm and it is consumed from -`node_modules` as installed. To test against your local working copy inside the `directus/directus` monorepo, set -`DIRECTUS_LOCAL_PATH` in `.env` to point to your monorepo checkout: - -```sh -DIRECTUS_LOCAL_PATH=../directus -``` - -When set, Vite aliases `@directus/visual-editing` directly to the package source -(`packages/visual-editing/src/index.ts`) — no build step is required in the monorepo, edits are picked up on dev-server -reload. Unset (or comment out) the var to fall back to the installed npm package in `node_modules`. - -> [!NOTE] -> -> The `monolith` test mode serves `visual-editing.js` via a plain `