Disable EditPage and GithubLink
Question
Description Is there a way of disabling EditPage and GithubLink on the default template? It could be as simple as setting "visibility: hidden" in the stylesheet for those components but not having used react-emotion in the past I'm not sure if I can overwrite the styles easily.
Thanks!
I'm trying to figure this out as well.
@pedronauck is there any way to disable/hide this feature using themeConfig in the doczrc.js file?
Thanks a lot!
After taking a look at the Page.tsx component one quick/dirty way to disable both EditPage and GithubLink is to remove the "repository" prop from your package.json.
EditPage and GithubLink rely on it as prop in order to render. Would still be nice to disable it with a proper config entry though...
That works fine for my project as it's a private repo, probably not a good solution for public projects.
You may set repository: false in your doczrc.js to disable a github link.
@denisborovikov It works to remove the github link, thanks a lot! The Edit Page link is still there though. Do you have any idea of how to hide it?
@rlueder I tested your solution and it works just fine! It would be better if we could find a way to set to false on the doczrc.js file for both EditPage and GithubLink, but if there isn't a way to do so, this is the solution I'm gonna go with in my project as well. Thanks =)
As a workaround, you can set the edit property in each document to false as seen here
https://github.com/pedronauck/docz/blob/84283f1d63ac40c0c1ee787db768c51945e4f79f/core/docz-theme-default/src/components/ui/Page.tsx#L71
---
name: Intro
edit: false
---
I haven't found a way to do this globally.