Jekyll子网站上的静态网站生成?

问题描述:

是否可以在GitHub托管的网站的单个子区域中放置Jekyll?即是否可以让"example.github.io"成为常规网站,而让"example.github.io/blog"由Jekyll静态生成?

Is it possible to have Jekyll on a single subsection of my website hosted on GitHub? i.e. is it possible to have "example.github.io" be a regular site and "example.github.io/blog" be statically generated by Jekyll?

我相信可以通过创建另一个名为"blog"的GitHub存储库并由Jekyll管理该存储库来实现.我想知道是否可以在一个主要的"example.github.io"存储库中完成所有操作.

I believe it's possible to do this by creating another GitHub repo called "blog" and having that repo managed by Jekyll. I'm wondering if it can all be done in one main "example.github.io" repo.

谢谢!

是的,有可能.您只需使用_config.yml中的Exclude设置来告诉Jekyll应该忽略哪些文件和/或文件夹.同样,您也可以使用Include设置专门包含文件和/或文件夹.

Yes, it's possible. You just have to use the Exclude setting in your _config.yml to tell Jekyll which files and/or folders it should ignore. Similarly, you can also use the Include setting to specifically include files and/or folders.

配置设置/全局配置

Configuration Settings / Global Configuration

https://jekyllrb.com/docs/configuration/#global-configuration