diff --git a/config.json.example b/config.json.example index b062029..8236974 100644 --- a/config.json.example +++ b/config.json.example @@ -23,6 +23,7 @@ "themeColor": "#A855F7" }, "contentSource": "{process}/docs", + "contentEditUrl": "https://git.rainnny.club/PulseApp/docs-content/src/branch/master/{slug}{ext}", "socialLinks": [ { "name": "GitHub", diff --git a/src/app/types/config.ts b/src/app/types/config.ts index 7cd8981..ff0f4c1 100644 --- a/src/app/types/config.ts +++ b/src/app/types/config.ts @@ -23,6 +23,11 @@ export type Config = { */ contentSource: string; + /** + * The URL to link to for editing content of a page. + */ + contentEditUrl: string; + /** * Social links for this app. */ diff --git a/src/components/on-this-page.tsx b/src/components/on-this-page.tsx index ebaf551..0d82d97 100644 --- a/src/components/on-this-page.tsx +++ b/src/components/on-this-page.tsx @@ -8,6 +8,7 @@ import { motion, useInView } from "framer-motion"; import { Separator } from "@/components/ui/separator"; import { Button } from "@/components/ui/button"; import { AlignLeftIcon, ArrowUpFromDot, MoveRight } from "lucide-react"; +import config from "@/config"; type Header = { id: string; @@ -148,7 +149,9 @@ const Footer = ({ page }: { page: DocsContentMetadata }): ReactElement => { {/* Edit on Git */}