Skip to content

Commit 33032c4

Browse files
committed
add 'edit this page' button; closes daattali#1004
1 parent f2c2a4b commit 33032c4

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
## Unreleased version
22

33
- Added `post_search` config setting that creates a Search button in the navbar (older websites need to set `post_search: true` to enable this feature) (#770)
4+
- Added `edit_page_button` config setting that adds a "Edit page" button to the footer (to edit the current page on GitHub) (#1004)
45
- BREAKING CHANGE: More control over RSS feed sharing: previously, an RSS feed was *always* generated, and if the config setting `rss-description` was set then there was an RSS icon in the footer. Now, an RSS feed is only generated when the config setting `rss-description` exists, and an RSS footer icon is only shown if `rss: true` is set in the `social-network-links` config settings
56
- Fixed page titles, subtitles, and excerpts rendering correctly when there are special characeters in them (#856)
67
- Slightly reworked margins and position for avatar image to resolve an alignment issue on Safari.

_config.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,9 @@ feed_show_tags: true
9696
# Add a search button to the navbar
9797
post_search: true
9898

99+
# Add a button in the footer to edit the current page. Only works if your website is hosted on GitHub
100+
edit_page_button: true
101+
99102
# The keywords to associate with your website, for SEO purposes
100103
#keywords: "my,list,of,keywords"
101104

_includes/footer.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@
3030
<a href="http://{{- site.matomo.uri -}}/index.php?module=CoreAdminHome&action=optOut" target="_blank" class="text_muted">Do-not-Track</a>
3131
{% endif %}
3232
{% endif%}
33+
34+
{% if site.edit_page_button and site.github.repository_url %}
35+
&nbsp;&bull;&nbsp;
36+
<a title="Edit this page on GitHub" href="{{ site.github.repository_url }}/edit/{{ site.github.source.branch }}/{{ page.path }}" class="text_muted">Edit page</a>
37+
{% endif%}
38+
3339
</p>
3440
{% unless site.remove-ads %}<p class="theme-by text-muted">
3541
Powered by

0 commit comments

Comments
 (0)