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 1 year has passed since last update.

Jekyll exclude

Last updated at Posted at 2023-06-21

exclude

Jekyllによってビルドプロセスから除外されるファイルやディレクトリを指定するための設定オプション

Jekyllは、ウェブサイトをビルドする際にソースディレクトリ内のすべてのファイルを処理する
一方で、一部のファイルやディレクトリはビルドの対象外にしたい場合がある

EX)ソースディレクトリ内の下書きや一時的なファイルなどは、最終的なウェブサイトに含まれる必要がないときなど

excludeオプションを使用すると↓

  • Jekyllに特定のファイルやディレクトリをビルドプロセスから除外するよう指示できる
  • 通常、このオプションは_config.ymlファイルで設定される

例:excludeオプションを使用して除外するファイルやディレクトリを指定


exclude:
  - Gemfile
  - Gemfile.lock
  - _drafts/
  - _temp/
  • Gemfile、Gemfile.lock、_drafts/、_temp/というファイルやディレクトリがビルドプロセスから除外される
    →これらのファイルは最終的なウェブサイトに含まれず、ビルド時に無視される

まとめ

  • excludeオプションは、ウェブサイトのソースディレクトリ内の特定のファイルやディレクトリを制御するために使用される
  • Jekyllのビルドプロセスから除外する必要のあるファイルやディレクトリがある場合は、excludeオプションを使用して指定できる
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?