2017-06-12 5 views
0

現在、自分のサイトが構築されると、さまざまなアセット(たとえば、静的、アップロードなど)のサブフォルダが_siteディレクトリ内に作成されます。私はすべてのファイルをサブフォルダのない最上位ディレクトリにダンプするだけです。したがって、すべての画像や投稿などは、サブフォルダの分離なしで_siteにまとめられます。Jekyllはサブフォルダなしの_siteにすべてのファイルを作成します

_site 
    - image01.jpg 
    - home.html 
    - 2017-05-24-sample-post.html 
    - main.css 
    - main.js 

これは可能ですか?

答えて

0

すべてのファイルをルートレベルにすると、Jekyllは_siteに対応するファイルを直接生成します。投稿にpermalinksを使用している場合は例外があるかもしれませんが、他のファイルでも動作するはずです。例えば

$ jekyll new newsite --blank 
$ touch image01.jpg 
$ touch home.html 
$ touch 2017-05-24-sample-post.html 
$ touch main.css 
$ touch main.js 

$ tree 
. 
├── 2017-05-24-sample-post.html 
├── about.md 
├── _config.yml 
├── Gemfile 
├── Gemfile.lock 
├── home.html 
├── image01.jpg 
├── index.md 
├── main.css 
├── main.js 
└── _posts 
    └── 2017-06-12-welcome-to-jekyll.markdown 

1 directory, 11 files 
$jekyll build 

├── 2017-05-24-sample-post.html 
├── about.md 
├── _config.yml 
├── Gemfile 
├── Gemfile.lock 
├── home.html 
├── image01.jpg 
├── index.md 
├── main.css 
├── main.js 
├── _posts 
│   └── 2017-06-12-welcome-to-jekyll.markdown 
└── _site 
    ├── 2017-05-24-sample-post.html 
    ├── about 
    │   └── index.html 
    ├── assets 
    │   └── main.css 
    ├── feed.xml 
    ├── home.html 
    ├── image01.jpg 
    ├── index.html 
    ├── jekyll 
    │   └── update 
    │    └── 2017 
    │     └── 06 
    │      └── 12 
    │       └── welcome-to-jekyll.html 
    ├── main.css 
    └── main.js 

9 directories, 21 files 

は、新しいファイルがルートレベルで作成する方法を参照してください。

関連する問題