2016-03-15 80 views
0

我正在尝试将Jekyll博客添加到现有引导站点。 (很高兴使用任何可以轻松配置为与现有网站配合的SGG,但只有参考我可以找到任何人这样做:Adding Jekyll to an existing website)。配置Jekyll输出以将博客添加到现有站点

当前布局

/website/index.html 
/website/css/bootstrap.css 
/website/_jekyll/_posts/first_post.markdown 

first_post.markdown:

--- 
layout: post 
title: "Does this work?" 
date: 2016-03-15 16:06:25 +0800 
categories: blogging stuff 
--- 
Hello blog first post 

预建

/website/blog 

杰奇后建立

/website/blog/blogging/stuff/2016/03/15/welcome-to-jekyll.html 

我不能理解的是如何将这个博客链接到网站的现有结构。我可以在index.html中加入/ blog url的链接,但我不想手动构建每个博客的精确html路径和硬编码到index.html页面。

另一种选择是'颠倒'网站,以便jekyll首先将网站建立为博客 - 但是,如何设置我正在使用的引导主题(用于博客和主页)并将博客设为从主页面链接到辅助页面?

+0

也许你可以从一个新的开始杰基尔并转换您现有的所有网站。看到[添加Bootstrap到Jekyll](http://stackoverflow.com/questions/28733425/adding-bootstrap-to-jekyll/28737999#28737999) –

+0

@DavidJacquel谢谢,我正试图做这个atm。 –

回答

2

Jekyll blog posts on non index.html pages

我现在有这样的结构:

website 
    index.html #homepage 
    otherpage.html 
    /blog/index.html #blog page 
    _posts/post1.md 
    _config.yaml 

在_config.yaml:

paginate: 5 
paginate_path: blog/page:num 

,并正在确定