We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
当たり前といえば当たり前なのだが、チュートリアルを Gooogle 翻訳で英語にして読んでいる場合にコードブロックをそのままコピペして実行しようとすると動かないことがある。
全て英語でちゃんと書かれたページを用意できればそれで良いのだけど、何か他に対策がないか。
The text was updated successfully, but these errors were encountered:
class="notranslate" を付ければ良いらしい
https://webmasters.googleblog.com/2008/10/helping-you-break-language-barrier.html
ただコードブロックを書く度にこれを付けるのって超面倒で絶対作業抜けが発生する。 サイトのビルド (jekyll や netlify) 側で何とか出来ないか検討したいところ。
Sorry, something went wrong.
現時点のGitHub PagesはJekyll3系なので、以下のように _config.yml に記述すると class を追加できると思います。
_config.yml
class
https://help.github.com/articles/updating-your-markdown-processor-to-kramdown/
kramdown: input: GFM syntax_highlighter: rouge syntax_highlighter_opts: css_class: 'notranslate'
折角コメント頂いていたのに見逃してましたごめんなさい。 syntax_highlighter_opts とかあったのですね。ただ、GitHub ドキュメントで書かれている kramdown の設定しててもどうも GitHub Pages と挙動違うなと調べた結果、CommonMarkGhPages 使うようになってた https://github.com/github/pages-gem/releases/tag/v172 ためそれに合わせています。そちらで使ってる syntax highight 周りのオプション指定を調べないとですね。
あと、付加する属性としては translate グローバル属性 <p translate="no"> の方良さそうでした。任意属性が付与できないなら class で良いけど。
<p translate="no">
No branches or pull requests
当たり前といえば当たり前なのだが、チュートリアルを Gooogle 翻訳で英語にして読んでいる場合にコードブロックをそのままコピペして実行しようとすると動かないことがある。
全て英語でちゃんと書かれたページを用意できればそれで良いのだけど、何か他に対策がないか。
The text was updated successfully, but these errors were encountered: