Skip to content
New issue

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

URL 自動リンク #13

Closed
dynamis opened this issue Oct 2, 2018 · 3 comments
Closed

URL 自動リンク #13

dynamis opened this issue Oct 2, 2018 · 3 comments
Labels
enhancement New feature or request

Comments

@dynamis
Copy link
Contributor

dynamis commented Oct 2, 2018

github 上で md ファイルを参照するときには自動リンクが付くが jekyll のビルドによる github pages では付かない。そのままでも良いけど自動リンクあった方が便利かも知れない。

取りあえず出来ないことを明確にするために issue を残します。

@dynamis dynamis added the enhancement New feature or request label Oct 2, 2018
@dynamis
Copy link
Contributor Author

dynamis commented Oct 31, 2018

GFM として処理させるようにした #24 ので解決したはず。

@dynamis dynamis closed this as completed Oct 31, 2018
@dynamis
Copy link
Contributor Author

dynamis commented Nov 2, 2018

kramdown の GFM に設定しても autolink が有効にならない様子。

https://jekyllrb.com/docs/configuration/markdown/

Jekyll デフォルトの redcarpet では autolink を有効にすれば良いが、GitHub Pages で採用する kramdown の設定にはない。

https://kramdown.gettalong.org/options.html

GitHub の Autolink では出来ると書いてあるが kramdown の issues では出来ないと書いている状況

https://help.github.com/articles/autolinked-references-and-urls/
gettalong/kramdown#306

Did a little digging, and it looks like the autolink filter in HTML pipeline, uses Rinku, a Ruby gem which implements autolinking. It'd be an additional dependency, so its your call, but maybe make it an optional dependency that autolinks if present?

https://help.github.com/articles/updating-your-markdown-processor-to-kramdown/

2016 年には kramdown だけサポートすると宣言して現在のドキュメントでもそう書かれてるけど変わったのか、GFM 再現したければ html-pipilen の Rinku での処理と組み合わせろということのどちらかということかな。。。と探していたら 2017 年に SFM の仕様を固めたアナウンスをしていて実装もあった。

https://githubengineering.com/a-formal-spec-for-github-markdown/
https://github.com/github/cmark-gfm

cmark-gfm がリファレンス実装と考えれば良さそうだが、これを jekyll でどう使うかというのが問題。

@dynamis
Copy link
Contributor Author

dynamis commented Feb 15, 2019

少しローカルで試行錯誤したのだけど、Gemfile 更新して

gem "github-pages", group: :jekyll_plugins

だけを書くようにしてあげると最新の github-pages が読み込まれ、そこから最新の jekyll-commonmark-ghpages が読み込まれるようになり、めでたく autolink オプションが有効になった。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant