From cfa03bedf87beae7ae343c77f28e38f6a2a3526f Mon Sep 17 00:00:00 2001 From: Tilman Vatteroth Date: Tue, 11 Jan 2022 15:59:03 +0100 Subject: [PATCH] Add netlify to README, intro.md and motd.txt Signed-off-by: Tilman Vatteroth --- README.md | 6 ++++++ netlify/intro.md | 13 +++++++++++++ netlify/motd.txt | 2 ++ netlify/motd.txt.license | 3 +++ netlify/patch-intro.js | 23 +++++++++++++++++++++++ package.json | 1 + 6 files changed, 48 insertions(+) create mode 100644 netlify/intro.md create mode 100644 netlify/motd.txt create mode 100644 netlify/motd.txt.license create mode 100644 netlify/patch-intro.js diff --git a/README.md b/README.md index bed7477d6..5591b633e 100644 --- a/README.md +++ b/README.md @@ -72,3 +72,9 @@ This will build the app in production mode and save it into the `.next` folder. best performance, minimized and the filenames include a hash value of the content. Don't edit them by hand! You can run the production build using the built-in server with `yarn start`. + +## UI Test + +Curious about the new look and feel? We provide a demo of the new UI on [hedgedoc.dev](https://hedgedoc.dev). This version uses mocked data and has no data persistence. + +The UI test is hosted by [netlify](https://netlify.com). Please check their [privacy policy](https://netlify.com/privacy) as well as [ours](https://hedgedoc.org/privacy-policy). diff --git a/netlify/intro.md b/netlify/intro.md new file mode 100644 index 000000000..1dd350d05 --- /dev/null +++ b/netlify/intro.md @@ -0,0 +1,13 @@ + + +:::warning +What you see is an UI-Test! It's filled with dummy data, not connected to a backend and no data will be saved. +::: + +![HedgeDoc Screenshot](/mock-backend/public/screenshot.png) + +[![Deployed using netlify](https://www.netlify.com/img/global/badges/netlify-color-accent.svg)](https://www.netlify.com) diff --git a/netlify/motd.txt b/netlify/motd.txt new file mode 100644 index 000000000..87cd750fb --- /dev/null +++ b/netlify/motd.txt @@ -0,0 +1,2 @@ +This demo is hosted by netlify. +Please check their privacy policy (https://netlify.com/privacy) as well as ours (https://hedgedoc.org/privacy-policy). diff --git a/netlify/motd.txt.license b/netlify/motd.txt.license new file mode 100644 index 000000000..078e5a9ac --- /dev/null +++ b/netlify/motd.txt.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2021 The HedgeDoc developers (see AUTHORS file) + +SPDX-License-Identifier: CC0-1.0 diff --git a/netlify/patch-intro.js b/netlify/patch-intro.js new file mode 100644 index 000000000..b066e8dbe --- /dev/null +++ b/netlify/patch-intro.js @@ -0,0 +1,23 @@ +/* + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) + * + * SPDX-License-Identifier: AGPL-3.0-only + */ + +const { copyFile } = require('fs/promises'); + +console.log("Patch intro.md to include netlify banner.") +copyFile("netlify/intro.md", "public/mock-backend/public/intro.md") + .then(() => console.log("Copied intro.md")) + .catch((error) => { + console.error(error); + process.exit(1); + }) + +console.log("Patch motd.txt to include privacy policy.") +copyFile("netlify/motd.txt", "public/mock-backend/public/motd.txt") + .then(() => console.log("Copied motd.txt")) + .catch((error) => { + console.error(error); + process.exit(1); + }) diff --git a/package.json b/package.json index 69582258d..25d49c2b3 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "license": "AGPL-3.0", "scripts": { "build": "next build", + "build:netlify": "node netlify/patch-intro.js && cross-env NEXT_PUBLIC_IGNORE_IFRAME_ORIGIN_CONFIG=true yarn build:mock", "build:mock": "cross-env NEXT_PUBLIC_USE_MOCK_API=true next build", "build:test": "cross-env NEXT_PUBLIC_USE_MOCK_API=true NEXT_PUBLIC_TEST_MODE=true next build", "analyze": "cross-env ANALYZE=true next build",