Skip to content

Removes edit this page link from every page #5629

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

Merged
merged 1 commit into from
Dec 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pydocmd.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
site_name: "Gitcoin Developer Documentation"
repo_name: 'gitcoinco/web'
repo_url: 'https://github.com/gitcoinco/web'
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor

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 ?

Copy link
Contributor Author

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.

Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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.

edit_uri: ''

# This tells pydocmd which pages to generate from which Python modules,
# functions and classes. At the first level is the page name, below that
Expand Down