diff --git a/config/config.yml b/config/config.yml index da00d6b..d94b218 100644 --- a/config/config.yml +++ b/config/config.yml @@ -58,6 +58,7 @@ features: editOnRepo: location: https://github.com/allure-framework/allure-docs type: github + branch: master editable: true mermaid: language: "mermaid" diff --git a/gatsby-config.js b/gatsby-config.js index 93b01cc..7044c6f 100755 --- a/gatsby-config.js +++ b/gatsby-config.js @@ -264,6 +264,7 @@ module.exports = { description: config.metadata.description, docsLocation: config.features.editOnRepo.location, docsLocationType: config.features.editOnRepo.type, + docsLocationBranch: config.features.editOnRepo.branch, editable: config.features.editOnRepo.editable, siteImage: config.metadata.siteImage, favicon: config.metadata.favicon, diff --git a/src/templates/docs.js b/src/templates/docs.js index 229c8a1..f02db9e 100644 --- a/src/templates/docs.js +++ b/src/templates/docs.js @@ -117,9 +117,8 @@ export default class MDXRuntimeTest extends React.Component { const { mdx, site: { - siteMetadata: { docsLocation, docsLocationType, editable }, + siteMetadata: { docsLocation, docsLocationType, docsLocationBranch, editable }, }, - gitBranch, } = data; // meta tags @@ -135,7 +134,7 @@ export default class MDXRuntimeTest extends React.Component { {docsLocation && ((editable && mdx.frontmatter.editable !== false) || mdx.frontmatter.editable === true) ? ( @@ -185,6 +184,7 @@ export const pageQuery = graphql` title docsLocation docsLocationType + docsLocationBranch editable } }