Skip to content
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

Make the edit this page button more useful #43

Closed
colinwilson opened this issue Aug 27, 2023 Discussed in #37 · 1 comment
Closed

Make the edit this page button more useful #43

colinwilson opened this issue Aug 27, 2023 Discussed in #37 · 1 comment
Assignees
Labels
improvment Improve an existing feature
Milestone

Comments

@colinwilson
Copy link
Owner

Discussed in #37

Originally posted by hugo-sid August 26, 2023

Current behavior

Clicking on the 'edit this page' button opens the corresponding Markdown file from the most recent commit.

What's the problem

The edit this file option on GitHub is disabled, when it is opened in the above mentioned manner. So, the purpose (allowing one to edit) is not served.

image

Expected behavior with example

Consider the URL: https://lotusdocs.dev/docs/guides/features/feedback-widget/
Clicking on the 'edit this page' button opens: https://github.com/colinwilson/lotusdocs.dev/blob/9907176ffb06a0c8652386aa9f72668a90d85bdc/content/docs/guides/features/feedback-widget.md/ - edit option is disabled.

It would be better if the 'edit this page' button opens any of the following links:

Example of Kind 1 link

https://gohugo.io/content-management/organization/#url

image

Example of Kind 2 link

https://developers.cloudflare.com/workers/platform/limits#log-size

image

Solution

One possible solution (not tested) can be to use:

<a href="{{.Site.Params.ghrepo}}edit/release/content/{{ .Lang }}/{{.File.Path}}">Edit this page</a>

Then in config/_default/params.toml :

## GH repo include trailing slash
ghrepo = "https://github.com/colinwilson/lotusdocs/"
@colinwilson colinwilson added the enhancement New feature or request label Aug 27, 2023
@colinwilson colinwilson self-assigned this Aug 27, 2023
@colinwilson colinwilson added this to the First Release milestone Aug 27, 2023
@colinwilson
Copy link
Owner Author

Fixed by 4f16b31 and 6bc7970

@colinwilson colinwilson added improvment Improve an existing feature and removed enhancement New feature or request labels Sep 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvment Improve an existing feature
Projects
None yet
Development

No branches or pull requests

1 participant