-
-
Notifications
You must be signed in to change notification settings - Fork 775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Removes edit this page link from every page #5629
Removes edit this page link from every page #5629
Conversation
Codecov Report
@@ Coverage Diff @@
## master #5629 +/- ##
==========================================
+ Coverage 30.06% 30.08% +0.02%
==========================================
Files 248 248
Lines 21380 21380
Branches 3102 3102
==========================================
+ Hits 6427 6433 +6
+ Misses 14677 14671 -6
Partials 276 276
Continue to review full report at Codecov.
|
IMO, the button should be able to redirect to a valid link. But not to be removed somehow. |
@molecula451 the markdown files are generated from the python modules by configuring in pydocmd and the generated files are then rendered on the server. These files probably are not uploaded or updated on git repositories so it won't be possible to provide an edit link. The thing that can be done is error reporting, by which the user can open an issue on GitHub regarding the errors in the documentation, but that should not be the part of |
@owocki @thelostone-mc @danlipert @octavioamu please review. |
@@ -1,6 +1,6 @@ | |||
site_name: "Gitcoin Developer Documentation" | |||
repo_name: 'gitcoinco/web' | |||
repo_url: 'https://github.com/gitcoinco/web' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what does removing the repo_url
do here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danlipert MkDocs automatically depending upon the theme takes this parameter repo_url
and creates an edit link over every page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agbilotia1998 I see - does removing the repo_url
affect anything else in the docs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danlipert seems nothing else gets effected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agbilotia1998 great - how did you test that nothing else was affected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can't we set the edit_uri to '' and leave the repo url ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thelostone-mc some themes take the repo url and automatically checks hosts like github.com, if present, it automatically creates an edit link by appending /edit/master/docs
to the repo_url for every page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@agbilotia1998 would be good to keep the stars and forks info.. is there some way we can disable the edit links without removing the metrics?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@danlipert @thelostone-mc this PR in pydocmd package fixes the problem by adding the edit_uri
parameter in the mkdocs configuration NiklasRosenstein/pydoc-markdown#80
This change will be included in v2.0.6 which is not released yet, currently, we are using v2.0.4 and v2.0.5 also does not provide a fix for this. For now, maybe we can just comment the repo_url parameter stating to be used with v2.0.6 or other thing that can be done is cloning this package and adding edit_uri
parameter at https://github.com/NiklasRosenstein/pydoc-markdown/blob/54c33c8845e5936a25667ebb20d10a9913793910/pydocmd/__main__.py#L75
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm... looks like v2.0.5. was released over a year ago... in that case I'm fine with having the metrics removed for now since it doesn't look like v2.0.6 is coming any time soon.
@agbilotia1998 The core engineers are automatically notified when PRs are opened, so please don't tag us for reviews as it spams our inboxes - thanks! |
⚡️ A tip worth 0.13000 ETH (16.61 USD @ $127.78/ETH) has been granted to @agbilotia1998 for this issue from @owocki. ⚡️ Nice work @agbilotia1998! Your tip has automatically been deposited in the ETH address we have on file.
|
Description
The PR removes the
Edit this page
button from the documentation pages which redundantly redirects to a 404 page.Refers/Fixes
#4943
Testing
No tests required.