diff --git a/Gemfile b/Gemfile index ed6986b36..4bd9725ce 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ gem 'rouge', '1.11.1' gem 'jekyll-feed', '0.9.2' gem 'scss_lint', require: false gem 'elevenlabs-amp-jekyll', '1.1' -gem 'jekyll-multiple-languages-plugin', '1.5.1' +gem 'jekyll-multiple-languages-plugin', :git => "git://github.com/eko/jekyll-multiple-languages-plugin.git" group :test do gem 'rake' diff --git a/Rakefile b/Rakefile index 2b31226b5..ded6479e2 100644 --- a/Rakefile +++ b/Rakefile @@ -26,7 +26,8 @@ end # push to algolia task :algolia_push do if ENV['TRAVIS_BRANCH'] == 'master' && ENV['TRAVIS_PULL_REQUEST'] == "false" - jekyll('algolia push') + sh 'sed' + jekyll('algolia push --config _config.yml,_algolia.yml') end end diff --git a/_algolia.yml b/_algolia.yml new file mode 100644 index 000000000..67dc76702 --- /dev/null +++ b/_algolia.yml @@ -0,0 +1,11 @@ +# ALGOLIA +algolia: + application_id: '5IGTHBX5JS' + index_name: 'blog_eleven' + excluded_files: + - amp + +# LANGUAGE-SPECIFIC: Trick to do not index multiple times for each language +default_lang: fr +languages: ["fr"] +exclude_from_localizations: ["authors", "css", "fonts", "img", "js", "_posts"] \ No newline at end of file diff --git a/_config.yml b/_config.yml index 47607900d..f7f905f84 100644 --- a/_config.yml +++ b/_config.yml @@ -71,13 +71,6 @@ theme_settings: paginate: 10 paginate_path: "/blog/page:num" -# ALGOLIA -algolia: - application_id: '5IGTHBX5JS' - index_name: 'blog_eleven' - excluded_files: - - amp - exclude: [vendor, _authors/TEMPLATE-AUTOR] # BUILD SETTINGS diff --git a/_i18n/en.yml b/_i18n/en.yml index 16c9459b2..419aecf9c 100644 --- a/_i18n/en.yml +++ b/_i18n/en.yml @@ -7,4 +7,10 @@ global: prev: Previous continue_reading: Read article newsletter_subscribe: Subscribe to our newsletter! - search_input: Search \ No newline at end of file + search_input: Search +authors: + by: by + and: and + from_same_author: "From the same author:" +reading: + time: "Reading time:" \ No newline at end of file diff --git a/_i18n/fr.yml b/_i18n/fr.yml index 2cc6ba833..3cdea736a 100644 --- a/_i18n/fr.yml +++ b/_i18n/fr.yml @@ -7,4 +7,10 @@ global: prev: Précédent continue_reading: Lire l'article newsletter_subscribe: Abonnez-vous à notre newsletter ! - search_input: Rechercher \ No newline at end of file + search_input: Rechercher +authors: + by: par + and: et + from_same_author: "Du même auteur :" +reading: + time: "Lecture :" \ No newline at end of file diff --git a/_includes/author_link.html b/_includes/author_link.html index 5812ac61a..d00c45aa9 100644 --- a/_includes/author_link.html +++ b/_includes/author_link.html @@ -1,5 +1,5 @@ -- par +- {% translate authors.by %} {% for author in include.authors %} {% assign isFirstAuthor = forloop.first %} @@ -9,11 +9,11 @@ {% if existingAuthor.login == author %} {% if isFirstAuthor %} {% elsif isLastAuthor %} - et + {% translate authors.and %} {% else %} , {% endif %} - {{ existingAuthor.title }} + {{ existingAuthor.title }} {% endif %} {% endfor %} {% endfor %} diff --git a/_includes/header.html b/_includes/header.html index 9b2bdca47..b5ca0745c 100644 --- a/_includes/header.html +++ b/_includes/header.html @@ -18,8 +18,8 @@

{% assign link = language %} {% endif %}
  • - - {{ language }} + + {{ language }}
  • {% endif %} diff --git a/_includes/reading_time.html b/_includes/reading_time.html index 570cdbe14..56e7df3d2 100644 --- a/_includes/reading_time.html +++ b/_includes/reading_time.html @@ -1,8 +1,8 @@ {% assign words = include.content | number_of_words %} {% if words < 360 %} - lecture: 1 min + {% translate reading.time %} 1 min {% else %} - lecture: {{ words | divided_by:180 }} mins + {% translate reading.time %} {{ words | divided_by:180 }} mins {% endif %} diff --git a/_layouts/author.html b/_layouts/author.html index eec1dd7e8..32c641035 100644 --- a/_layouts/author.html +++ b/_layouts/author.html @@ -22,7 +22,7 @@

    {{ page.title }}

    -

    Du même auteur :

    +

    {% translate authors.from_same_author %}