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

Add GitHub "edit" button #157

Merged
merged 3 commits into from
Jul 5, 2022
Merged

Add GitHub "edit" button #157

merged 3 commits into from
Jul 5, 2022

Conversation

rphla
Copy link
Contributor

@rphla rphla commented Jul 4, 2022

Adds a GitHub edit button beside the Date update text.

Demo: https://rphla.github.io/garden/+Home/

@@ -15,7 +15,8 @@ <h1 id="page-title"><a href="{{ .Site.BaseURL }}">{{ .Site.Data.config.page_titl
<article>
{{if .Title}}<h1>{{ .Title }}</h1>{{end}}
<p class="meta">
Last updated {{if ne .Date .Lastmod}}{{ .Lastmod.Format "January 2, 2006" }}{{else}}Unknown{{end}}
Last updated {{if ne .Date .Lastmod}}{{ .Lastmod.Format "January 2, 2006" }}{{else}}Unknown{{end}}.
{{ partial "github.html" . }}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we change this to spaces to keep it consistent?

@@ -0,0 +1,3 @@
{{if $.Site.Data.config.onGitHub}}
<a href="{{$.Site.Data.config.GHlink}}/{{ .Path}}" rel="noopener">Edit</a>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<a href="{{$.Site.Data.config.GHlink}}/{{ .Path}}" rel="noopener">Edit</a>
<a href="{{$.Site.Data.config.GHlink}}/{{ .Path}}" rel="noopener">Edit Source</a>

@rphla
Copy link
Contributor Author

rphla commented Jul 5, 2022

applied 👌

@jackyzha0 jackyzha0 merged commit 25a4d3b into jackyzha0:hugo Jul 5, 2022
@rphla rphla deleted the github_edit branch July 6, 2022 10:29
j0nesma pushed a commit to j0nesma/quartz that referenced this pull request Sep 22, 2023
tomoyanonymous pushed a commit to tomoyanonymous/quartz-research-note that referenced this pull request Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants