Skip to content

Commit 147e8c5

Browse files
committed
Fix 'Edit on github.com' link on all pages
1 parent d717be1 commit 147e8c5

File tree

1 file changed

+28
-19
lines changed

1 file changed

+28
-19
lines changed

_layouts/page.html

+28-19
Original file line numberDiff line numberDiff line change
@@ -3,32 +3,41 @@
33
---
44

55
<div class="page-header">
6-
<div class="row">
7-
<div class="col-md-7">
8-
<h1>{{ page.title }}
9-
{% if page.subtitle %}<small>{{ page.subtitle }}</small>{% endif %}
10-
</h1>
11-
</div>
12-
<div class="col-md-5 edit-buttons">
13-
<!-- Hide Prose.io: it allows edits but result cannot be saved in any way (message "Error connecting to Github") so it is
6+
<div class="row">
7+
<div class="col-md-7">
8+
<h1>{{ page.title }}
9+
{% if page.subtitle %}<small>{{ page.subtitle }}</small>{% endif %}
10+
</h1>
11+
</div>
12+
<div class="col-md-5 edit-buttons">
13+
<!-- Hide Prose.io: it allows edits but result cannot be saved in any way (message "Error connecting to Github") so it is
1414
more annoying than useful. Actually not useful at all, but misleading. Fix the whole process before enabling again. -->
15-
<!-- a href="http://prose.io/#{{site.github.repo}}/edit/master/{{page.path}}" class="btn btn-default pull-right-md pull-left-sm">
15+
<!-- a href="http://prose.io/#{{site.github.repo}}/edit/master/{{page.path}}" class="btn btn-default pull-right-md pull-left-sm">
1616
<i class="glyphicon glyphicon-edit"></i> Edit in Prose.io
1717
</a -->
18-
<a href="https://seravo.com/" class="btn btn-default pull-right-md pull-left-sm">
19-
<i class="glyphicon glyphicon-arrow-right"></i> Go to seravo.com
20-
</a>
21-
<a href="https://github.com/{{site.github.repo}}/edit/master/{{page.path}}" class="btn btn-default pull-right-md pull-left-sm">
22-
<i class="glyphicon glyphicon-file"></i> Edit on github.com
23-
</a>
24-
</div>
25-
</div>
18+
<a href="https://seravo.com/" class="btn btn-default pull-right-md pull-left-sm">
19+
<i class="glyphicon glyphicon-arrow-right"></i> Go to seravo.com
20+
</a>
21+
{% if page.path == "index.md" %}
22+
<a href="https://github.com/{{site.github.repo}}/edit/master/{{page.path}}"
23+
class="btn btn-default pull-right-md pull-left-sm">
24+
<i class="glyphicon glyphicon-file"></i> Edit on github.com
25+
</a>
26+
{% else %}
27+
<a href="https://github.com/{{site.github.repo}}/edit/master/pages/{{page.path}}"
28+
class="btn btn-default pull-right-md pull-left-sm">
29+
<i class="glyphicon glyphicon-file"></i> Edit on github.com
30+
</a>
31+
{% endif %}
32+
</div>
33+
</div>
2634
</div>
2735

2836
{% if page.summary %}
2937
<div class="bs-callout bs-callout-primary">
30-
<p><strong>Summary: </strong>{{ page.summary | newline_to_br | markdownify | remove: '<p>' | remove: '</p>' }}</p>
38+
<p><strong>Summary: </strong>{{ page.summary | newline_to_br | markdownify | remove: '
39+
<p>' | remove: '</p>' }}</p>
3140
</div>
3241
{% endif %}
3342

34-
{{ content }}
43+
{{ content }}

0 commit comments

Comments
 (0)