diff --git a/website/docusaurus.config.js b/website/docusaurus.config.js index 045d697b3..4f52a11dd 100644 --- a/website/docusaurus.config.js +++ b/website/docusaurus.config.js @@ -41,9 +41,9 @@ module.exports = { position: "left", }, { - to: "api/", - activeBasePath: "api", - label: "API", + to: "jobs/", + activeBasePath: "jobs", + label: "Jobs", position: "left", }, { diff --git a/website/src/pages/jobs.jsx b/website/src/pages/jobs.jsx new file mode 100644 index 000000000..b8bc84489 --- /dev/null +++ b/website/src/pages/jobs.jsx @@ -0,0 +1,41 @@ +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]); +}; + +function JobBoardWrapper() { + const context = useDocusaurusContext(); + const { siteConfig = {} } = context; + return ( + + + + ); +} + +function JobBoard() { + useScript( + "https://boards.greenhouse.io/embed/job_board/js?for=authentiksecurity" + ); + const { colorMode, setColorMode } = useColorMode(); + if (colorMode !== "light") { + setColorMode("light"); + } + return
; +} + +export default JobBoardWrapper;