Skip to content

Commit

Permalink
Edit this page content dir lang independent (alex-shpak#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler71 authored Apr 16, 2020
1 parent 0f58a77 commit b88d5f6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions exampleSite/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ enableGitInfo = true

# Enable "Edit this page" links for 'doc' page type.
# Disabled by default. Uncomment to enable. Requires 'BookRepo' param.
# Path must point to 'content' directory of repo.
BookEditPath = 'edit/master/exampleSite/content'
# Edit path must point to root directory of repo.
BookEditPath = 'edit/master/exampleSite'

# Configure the date format used on the pages
# - In git information
Expand Down
4 changes: 2 additions & 2 deletions exampleSite/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ params:

# Enable "Edit this page" links for 'doc' page type.
# Disabled by default. Uncomment to enable. Requires 'BookRepo' param.
# Path must point to 'content' directory of repo.
BookEditPath: edit/master/exampleSite/content
# Edit path must point to root directory of repo.
BookEditPath: edit/master/exampleSite

# Configure the date format used on the pages
# - In git information
Expand Down
2 changes: 1 addition & 1 deletion layouts/partials/docs/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

{{ if and .File .Site.Params.BookRepo .Site.Params.BookEditPath }}
<div>
<a class="flex align-center" href="{{ .Site.Params.BookRepo }}/{{ .Site.Params.BookEditPath }}/{{ replace .File.Path "\\" "/" }}" target="_blank" rel="noopener">
<a class="flex align-center" href="{{ .Site.Params.BookRepo }}/{{ .Site.Params.BookEditPath }}/{{ .Site.Params.contentDir }}/{{ replace .File.Path "\\" "/" }}" target="_blank" rel="noopener">
<img src="{{ "svg/edit.svg" | relURL }}" class="book-icon" alt="Edit" />
<span>{{ i18n "Edit this page" }}</span>
</a>
Expand Down

0 comments on commit b88d5f6

Please sign in to comment.