2015-10-18 57 views
0

我使用Jekyll生成博客和自定义集合的网站名为照片。我的自定义收藏品具有以下网址:0.0.0.0:4000/photos/photo-name。如何设置Jekyll集合归档URL?

collections: 
    photos: 
    output: true 
    permalink: /photos/:path/ 

在_site目录中,他们的产生:

_site/ 
    photos/ 
    photo-name/ 
     index.html 
    other-photo-name/ 
     index.html 

现在我想有照片存档,像这样的网址:0.0.0.0:4000/photos/。

那么有没有办法在_site/photos /目录下生成index.html?提前感谢!

回答

1

如果您想为您的照片制作索引页面,只需在前面创建一个photos.html页面,然后在permalink : /photos/的前面,它将生成一个_site/photos/index.html页面。