0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

jekyll リンクの掲載方法

Posted at

jekyllでリンクを文章の中に掲載したいと思い、下記のように記載しました。

[sitename]: https://hoge.com

でも、リンクがページに掲載されないのです。

色々と調べていて、気がつきました。

最初に生成されたページをよく見てみたら、下記のように書かれていました。

Check out the [Jekyll docs][jekyll-docs] for more info on how to get the most out of Jekyll. File all bugs/feature requests at [Jekyll’s GitHub repo][jekyll-gh]. If you have questions, you can ask them on [Jekyll Talk][jekyll-talk].

[jekyll-docs]: https://jekyllrb.com/docs/home
[jekyll-gh]:   https://github.com/jekyll/jekyll
[jekyll-talk]: https://talk.jekyllrb.com/

つまり

[sitename]: https://hoge.com

とリンクを予め設定します。
そしてリンクを挿入したいところに、下記のように書きます。

[sitename][sitename]

このように記載すると、リンクが貼られた言葉としてページに表示されます。

ハマった理由

[jekyll-docs]: https://jekyllrb.com/docs/home
[jekyll-gh]:   https://github.com/jekyll/jekyll
[jekyll-talk]: https://talk.jekyllrb.com/

と書かれているのを見て、つい[]にリンクを貼るテキストを書き、続けてリンク先のURLを書くのだと思い込んでしまったのです。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?