From ad7dedb61f237ed183ea42b71388ecd331651e2b Mon Sep 17 00:00:00 2001 From: Jens L Date: Fri, 12 May 2023 20:03:22 +0200 Subject: [PATCH] website: add email subscription form to footer (#5597) Signed-off-by: Jens Langhammer --- website/docusaurus.config.js | 11 ++ website/src/{ => components}/comparison.jsx | 0 website/src/footer.html | 106 ++++++++++++++++++++ website/src/pages/index.jsx | 2 +- 4 files changed, 118 insertions(+), 1 deletion(-) rename website/src/{ => components}/comparison.jsx (100%) create mode 100644 website/src/footer.html diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index f9b574a32..12d39925b 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -1,9 +1,12 @@ +const fs = require("fs"); const sidebar = require("./sidebars.js"); const releases = sidebar.docs .filter((doc) => doc.link?.slug === "releases")[0] .items.filter((release) => typeof release === "string"); +const footerEmail = fs.readFileSync("src/footer.html", { encoding: "utf-8" }); + /** @type {import('@docusaurus/types').DocusaurusConfig} */ module.exports = { title: "authentik", @@ -81,6 +84,14 @@ module.exports = { }, footer: { links: [ + { + title: "Subscribe to authentik News", + items: [ + { + html: footerEmail, + }, + ], + }, { title: "Documentation", items: [ diff --git a/website/src/comparison.jsx b/website/src/components/comparison.jsx similarity index 100% rename from website/src/comparison.jsx rename to website/src/components/comparison.jsx diff --git a/website/src/footer.html b/website/src/footer.html new file mode 100644 index 000000000..8ad9080ca --- /dev/null +++ b/website/src/footer.html @@ -0,0 +1,106 @@ + + + +
+
+
+
+ * indicates required +
+
+ + + +
+
+ + +
+ + +
+
+
+
+ +
+ + + diff --git a/website/src/pages/index.jsx b/website/src/pages/index.jsx index 4ccf481df..91c6b2df4 100644 --- a/website/src/pages/index.jsx +++ b/website/src/pages/index.jsx @@ -6,7 +6,7 @@ import BrowserOnly from "@docusaurus/core/lib/client/exports/BrowserOnly"; import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; import useBaseUrl from "@docusaurus/useBaseUrl"; import styles from "./styles.module.css"; -import Comparison from "../comparison"; +import Comparison from "../components/comparison"; import "react-before-after-slider-component/dist/build.css"; const features = [