The project is in a healthy, maintained state
Write a longer description of the gem. Use as many lines as you like.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

Jekyll_google_translate Gem Version

Adds Google Translate to a web page.

Installation

Add the following to your Jekyll website's Gemfile:

group :jekyll_plugins do
  gem 'jekyll_google_translate'
end

And then execute:

$ bundle

Copy demo/assets/css/jekyll_google_translate.css to your Jekyll web site's CSS directory, and update your layout accordingly.

Usage

The {% google_translate_html %} tag must be called to insert HTML into the page, then the {% google_translate_javascript %} tag must be called to insert Javascript into the page. For example:

<!DOCTYPE html>
<html lang="{{ site.lang | default: "en-US" }}">
  <head>
    <link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: nowMillis }}" type="text/css">
    <link rel="stylesheet" href="{{ '/assets/css/jekyll_google_translate.css?v=' | append: nowMillis }}" type="text/css">
  </head>
  <body>
    <nav id="sidebar">
      {% google_translate_html %}
    </nav>
  </body>
  {% google_translate_javascript %}
</html>

The above is usually incorporated into a layout, for example, _layouts/default.html.

Development

After checking out this git repository, install dependencies by typing:

$ bin/setup

You should do the above before running Visual Studio Code.

Run the Tests

$ bundle exec rake test

Interactive Session

The following will allow you to experiment:

$ bin/console

Local Installation

To install this gem onto your local machine, type:

$ bundle exec rake install

To Release A New Version

To create a git tag for the new version, push git commits and tags, and push the new version of the gem to https://rubygems.org, type:

$ bundle exec rake release

Contributing

Bug reports and pull requests are welcome at https://github.com/mslinn/jekyll_google_translate.

License

The gem is available as open source under the terms of the MIT License.