diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 24b57e08a..6841b37e4 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -164,33 +164,14 @@ module.exports = { }, ], ], - ssrTemplate: ` -> - - - - - - <%~ it.headTags %> - <% it.metaAttributes.forEach((metaAttribute) => { %> - <%~ metaAttribute %> - <% }); %> - <% it.stylesheets.forEach((stylesheet) => { %> - - <% }); %> - <% it.scripts.forEach((script) => { %> - - <% }); %> - - itemscope="" itemtype="http://schema.org/Organization"> - <%~ it.preBodyTags %> -
- <%~ it.appHtml %> -
- <% it.scripts.forEach((script) => { %> - - <% }); %> - <%~ it.postBodyTags %> - -`, + scripts: [ + { + src: "https://goauthentik.io/js/script.js", + async: true, + "data-domain": "goauthentik.io", + }, + { + src: "https://boards.greenhouse.io/embed/job_board/js?for=authentiksecurity", + }, + ], }; diff --git a/website/src/pages/jobs.jsx b/website/src/pages/jobs.jsx index b8bc84489..43ce59500 100644 --- a/website/src/pages/jobs.jsx +++ b/website/src/pages/jobs.jsx @@ -1,21 +1,9 @@ import React from "react"; import Layout from "@theme/Layout"; import useDocusaurusContext from "@docusaurus/useDocusaurusContext"; -import { useEffect } from "react"; import { useColorMode } from "@docusaurus/theme-common"; - -const useScript = (url, selector = "body", async = true) => { - useEffect(() => { - const element = document.querySelector(selector); - const script = document.createElement("script"); - script.src = url; - script.async = async; - element.appendChild(script); - return () => { - element.removeChild(script); - }; - }, [url]); -}; +import BrowserOnly from "@docusaurus/core/lib/client/exports/BrowserOnly"; +import { useEffect } from "react"; function JobBoardWrapper() { const context = useDocusaurusContext(); @@ -28,13 +16,13 @@ function JobBoardWrapper() { } function JobBoard() { - useScript( - "https://boards.greenhouse.io/embed/job_board/js?for=authentiksecurity" - ); const { colorMode, setColorMode } = useColorMode(); if (colorMode !== "light") { setColorMode("light"); } + useEffect(() => { + Grnhse.Iframe.load(); + }, []); return
; }