Skip to content

Commit 1bff6f3

Browse files
committed
Add 'edit this page' link. Closes #580.
1 parent c685569 commit 1bff6f3

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

_assets/stylesheets/styles.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,15 @@ article, aside, footer {
6060
text-decoration: none;
6161
}
6262

63+
#page-edit-link {
64+
position: absolute;
65+
z-index: 10;
66+
right: 28px;
67+
top: 10px;
68+
margin: 0;
69+
text-decoration: none;
70+
}
71+
6372
#logo-bar {
6473
float: left;
6574
margin-top: 1.617em;

_config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,7 @@ defaults:
276276
layout: "page"
277277
category: "default"
278278
product: "kendo-ui"
279+
editable: true
279280
-
280281
scope:
281282
path: "aspnet-mvc"
@@ -286,6 +287,7 @@ defaults:
286287
path: "api/aspnet-mvc"
287288
values:
288289
product: "aspnet-mvc"
290+
editable: false
289291
-
290292
scope:
291293
path: "php"
@@ -296,11 +298,13 @@ defaults:
296298
path: "api/php"
297299
values:
298300
product: "php-ui"
301+
editable: false
299302
-
300303
scope:
301304
path: "api/jsp"
302305
values:
303306
product: "jsp-ui"
307+
editable: false
304308
-
305309
scope:
306310
path: "jsp"

_layouts/page.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
</script>
2929
</div>
3030

31+
{% if page.editable %}<a id="page-edit-link" class="btn btn-action" href="https://github.com/telerik/kendo-docs/edit/master{{ page.url | replace: '.html','' }}.md">Edit this page</a>{% endif %}
32+
3133
{% if page.kind == "api" %}<div id="markdown-toc"></div>{% endif %}
3234

3335
<div id="page-article">

0 commit comments

Comments
 (0)