Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Apr 20, 2024
1 parent cd8fc31 commit 187e40a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ If you have a [Jekyll](https://jekyllrb.com/) static site,
this plugin may help you automatically
translate its pages to another language, through
[ChatGPT](https://chat.openai.com/). See how it
works for [my blog](https://github.com/yegor256/ru.yegor256.com),
works for [my blog](https://github.com/yegor256/ru.yegor256.com),
for example [this page](https://ru.yegor256.com/2023-08-13-dictators.html)
is translated to
[English](https://ru.yegor256.com/english/2023-08-13-dictators.html).
Expand Down Expand Up @@ -49,21 +49,21 @@ French is `_layout/translated.html` (you must have these files).

OpenAI API KEY must be set in the `OPENAI_API_KEY` environment variable,
otherwise
the plugin will not do any translation and won't generate translated pages.
the plugin will not do any translation and won't generate translated pages.
You can get your key
[here][open-ai].

OpenAI API base URL can be customized by the `OPENAI_API_BASE`
environment variable.
If this variable is not set, the default value is `https://api.openai.com/`.
If this variable is not set, the default value is `https://api.openai.com/`.

Inside the original page you can use `{{ page.chatgpt-translate.urls[XX] }}`
in order to render the URL
of the translated page, where `XX` is the [ISO-639-1][iso-693]
of the translated page, where `XX` is the [ISO-639-1][iso-639]
code of the target language.
Inside the translated page you can use
`{{ page.chatgpt-translate.original-url }}` in order
to get the URL of the page that was translated.
to get the URL of the page that was translated.

You can also use `{{ page.chatgpt-translate.model }}`
inside both the original page and the translated one,
Expand All @@ -86,7 +86,7 @@ If this option is not specified,
* `model` (optional) — specifies the model to use by ChatGPT,
[examples are here](https://github.com/alexrudall/ruby-openai#models).

* `source` (optional) — is the [ISO-639-1][iso-693] code of the source language.
* `source` (optional) — is the [ISO-639-1][iso-639] code of the source language.

* `no_download` (optional) — if this attribute is present, the plugin won't try
to find HTML versions of translated pages in the Internet and won't try to
Expand Down
Binary file modified logo.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 187e40a

Please sign in to comment.