From bc1bb066951e6959c0e2c1787d44e6ea4cc04850 Mon Sep 17 00:00:00 2001 From: Axel Haustant Date: Mon, 5 Feb 2018 16:28:14 +0100 Subject: [PATCH] Added edit link (fix #6) --- _config.yml | 10 ++++++++++ _layouts/page.html | 10 ++++++++++ _sass/main.scss | 9 +++++++++ 3 files changed, 29 insertions(+) diff --git a/_config.yml b/_config.yml index 01338a1..f0a39d2 100755 --- a/_config.yml +++ b/_config.yml @@ -5,6 +5,16 @@ description: > twitter_username: etalab github_username: etalab +github_repository: etalab/doc.data.gouv.fr + +lang: fr + +i18n: + en: + edit: Edit this page + fr: + edit: Editer cette page + sass: style: compressed diff --git a/_layouts/page.html b/_layouts/page.html index 9df85a8..b35ec8a 100755 --- a/_layouts/page.html +++ b/_layouts/page.html @@ -3,9 +3,19 @@ --- {% include hero.html %} +{% assign lang = page.lang | default: site.lang | default: "en" %}
{% include sidebar.html %}
{{ content }}
+ {% comment %} + Use the github edit link until netlify-cms support easy deep link. + See: https://github.com/netlify/netlify-cms/issues/697 + {% endcomment %} +

+ + ✎ {{ site.i18n[lang].edit }} + +

diff --git a/_sass/main.scss b/_sass/main.scss index 5116c6d..014dd3b 100755 --- a/_sass/main.scss +++ b/_sass/main.scss @@ -86,3 +86,12 @@ .page .categories__item { margin: 1em 0; } + +.text-center { + text-align: center; +} + +.edit-button { + padding: 5px 10px; + border: 1px solid #0081d5; +}