0

I am trying to add a Jekyll blog to an existing bootstrap site. (Happy to use any SGG that can easily be configured to work with existing site but only reference I can find to anyone doing this is here: Adding Jekyll to an existing website ).

Current layout

/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

pre build

/website/blog

after jekyll build

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

What I cant understand is how to link this blog into existing structure of the website. I can put a link to the /blog url in the index.html but I don't want to manually build out the exact html path to each blog and hard code that into the index.html page.

The other option is to 'invert' the site so that jekyll builds the site as a blog first - but how can I then set the bootstrap theme I'm using (for blog and main pages) and have the blog as a secondary page linked to from the main page?

Don Smythe
  • 9,234
  • 14
  • 62
  • 105
  • Maybe you can start from a new jekyll and convert all you existing site. See [Adding Bootstrap to Jekyll](http://stackoverflow.com/questions/28733425/adding-bootstrap-to-jekyll/28737999#28737999) – David Jacquel Mar 15 '16 at 13:17
  • @DavidJacquel thanks, am trying to do this atm. – Don Smythe Mar 16 '16 at 11:01

1 Answers1

2

See Jekyll blog posts on non index.html pages

I now have this structure:

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

in _config.yaml:

paginate: 5
paginate_path: blog/page:num

And is working OK

Don Smythe
  • 9,234
  • 14
  • 62
  • 105