Skip to content

Commit

Permalink
Louisa/devsite 967 logissue (#1552)
Browse files Browse the repository at this point in the history
* update github logissue

* update package.json

* revert package.json

* updates

* update package.json

* revert package

* Updates on docs.

* removed the example
  • Loading branch information
louisachu committed Dec 14, 2023
1 parent 96031a1 commit f459686
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 1 deletion.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2930,3 +2930,19 @@ You can check the latest released version of the theme at <https://github.com/ad
This repository is setup as a monorepo using [lerna](https://github.com/lerna/lerna) for automated publishing to NPM.
Use `GH_TOKEN=[YOUR_GH_TOKEN] lerna version --create-release github --conventional-commits --no-private -m "chore(release): publish"` for publishing the theme on npm.
## Remove GitHub Log an issue feature
![log-an-issue](docs/images/log-an-issue.png)
By default, any document pages will have "Log an issue/ Edit in Github" feature enabled.
This can be turned off through gatsby-config.js
```
siteMetadata: {
githubIssue: {
removeLogIssue: true,
},
}
```
Binary file added docs/images/log-an-issue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions packages/gatsby-theme-aio/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ exports.createSchemaCustomization = ({ actions }) => {
subPages: [SubPage]
versions: [Version]
docs: Link
githubIssue: GitHubIssue
salesFAQMenus: [salesFAQMenus]
techSupportFAQMenus: [techSupportFAQMenus]
subMenuPages: [subMenuPages]
Expand Down Expand Up @@ -138,6 +139,10 @@ exports.createSchemaCustomization = ({ actions }) => {
title: String
path: String
}
type GitHubIssue{
removeLogIssue: Boolean
}
type allFile {
edges: Node
Expand Down
3 changes: 3 additions & 0 deletions packages/gatsby-theme-aio/src/components/Layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,9 @@ export default ({ children, pageContext, location }) => {
title
path
}
githubIssue{
removeLogIssue
}
versions {
title
path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ export default ({ children, pageContext, query }) => {
margin-top: var(--spectrum-global-dimension-size-200);
}
`}>
<GitHubActions repository={repository} branch={branch} root={root} pagePath={pagePath} />
{siteMetadata && siteMetadata.githubIssue && siteMetadata.githubIssue.removeLogIssue ? null : <GitHubActions repository={repository} branch={branch} root={root} pagePath={pagePath} /> }
</div>
</div>
)}
Expand Down

0 comments on commit f459686

Please sign in to comment.