+ {editLink ? (
+
+ Seite bearbeiten
+
+ ) : null}
Impressum
diff --git a/src/components/layout.js b/src/components/layout.js
index 776a734..75fbd5a 100644
--- a/src/components/layout.js
+++ b/src/components/layout.js
@@ -3,10 +3,10 @@ import Nav from "../components/nav"
import Footer from "../components/footer"
import layoutStyles from "./layout.module.css"
-export default ({ children }) => (
+export default ({ editLink, children }) => (
<>
{children}
-
+
>
)
diff --git a/src/markdown-pages/datenschutz.mdx b/src/markdown-pages/datenschutz.mdx
index d7a20f6..6a692dd 100644
--- a/src/markdown-pages/datenschutz.mdx
+++ b/src/markdown-pages/datenschutz.mdx
@@ -1,6 +1,7 @@
---
path: "/datenschutz"
title: "Datenschutzerklärung"
+edit: "datenschutz.mdx"
---
## Datenschutzerklärung
diff --git a/src/markdown-pages/events.mdx b/src/markdown-pages/events.mdx
index 41690b4..cca8a41 100644
--- a/src/markdown-pages/events.mdx
+++ b/src/markdown-pages/events.mdx
@@ -1,6 +1,7 @@
---
path: "/events"
title: "Events"
+edit: "events.mdx"
---
## Events
diff --git a/src/markdown-pages/home.mdx b/src/markdown-pages/home.mdx
index 29ff279..df356f3 100644
--- a/src/markdown-pages/home.mdx
+++ b/src/markdown-pages/home.mdx
@@ -1,6 +1,7 @@
---
path: "/"
title: "Home"
+edit: "home.mdx"
---
## Wer wir sind
diff --git a/src/markdown-pages/impressum.mdx b/src/markdown-pages/impressum.mdx
index 2ba4317..8461a44 100644
--- a/src/markdown-pages/impressum.mdx
+++ b/src/markdown-pages/impressum.mdx
@@ -1,6 +1,7 @@
---
path: "/impressum"
title: "Impressum"
+edit: "impressum.mdx"
---
## Impressum
diff --git a/src/markdown-pages/kontakt.mdx b/src/markdown-pages/kontakt.mdx
index bc0ffea..e041292 100644
--- a/src/markdown-pages/kontakt.mdx
+++ b/src/markdown-pages/kontakt.mdx
@@ -1,6 +1,7 @@
---
path: "/kontakt"
title: "Kontakt"
+edit: "kontakt.mdx"
---
## Kontakt
diff --git a/src/markdown-pages/treff.mdx b/src/markdown-pages/treff.mdx
index 1588f40..3840f49 100644
--- a/src/markdown-pages/treff.mdx
+++ b/src/markdown-pages/treff.mdx
@@ -1,6 +1,7 @@
---
path: "/treff"
title: "Zeiten & Location"
+edit: "treff.mdx"
---
import RoomState from "../components/roomState.js"
diff --git a/src/markdown-pages/verein.mdx b/src/markdown-pages/verein.mdx
index ea0d358..2759403 100644
--- a/src/markdown-pages/verein.mdx
+++ b/src/markdown-pages/verein.mdx
@@ -1,6 +1,7 @@
---
path: "/verein"
title: "Verein"
+edit: "verein.mdx"
---
## Verein
diff --git a/src/templates/siteTemplate.js b/src/templates/siteTemplate.js
index aeb8cae..046cbeb 100644
--- a/src/templates/siteTemplate.js
+++ b/src/templates/siteTemplate.js
@@ -3,6 +3,9 @@ import { graphql } from "gatsby"
import Layout from "../components/layout"
import { MDXRenderer } from "gatsby-plugin-mdx"
+const ide =
+ "https://repos.ctdo.de/-/ide/project/neri/ctdo-hompage/edit/master/-/src/markdown-pages/"
+
export default function Template({
data, // this prop will be injected by the GraphQL query below.
}) {
@@ -13,8 +16,10 @@ export default function Template({
document.title = frontmatter.title
}, [frontmatter.title])
+ const editLink = frontmatter.edit ? ide + frontmatter.edit : null
+
return (
-
+
{body}
)
@@ -26,6 +31,7 @@ export const pageQuery = graphql`
body
frontmatter {
title
+ edit
}
}
}