Multiple 'blogs' under one site

934 views
Skip to first unread message

Mark Szymanski

unread,
Jan 19, 2011, 10:14:17 PM1/19/11
to jekyll.rb
Is it at all possible to have multiple "blog" sections for one site?
For instance, there be a main blog, and then a sort of "sub-blog"? For
instance, my website (http://mrminimalist.nfshost.com) has one main
blog. And I want a second one that could be for posting photos.

Is there any way to do this? I am perfectly fine with writing a plugin
if I would need to.

Krzysztof Wojciechowski

unread,
Jan 21, 2011, 8:53:16 AM1/21/11
to jeky...@googlegroups.com
Make another directory for posts (eg. /your/jekyll/home/photos/_posts) will make a new blog at mrminimalist.nfshost.com/photos.
Cheers,
-- Kwpolska (http://kwpolska.co.cc)



--
You received this message because you are subscribed to the Google Groups "jekyll.rb" group.
To post to this group, send email to jeky...@googlegroups.com.
To unsubscribe from this group, send email to jekyll-rb+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/jekyll-rb?hl=en.


Mark Szymanski

unread,
Jan 22, 2011, 11:49:56 AM1/22/11
to jeky...@googlegroups.com
Ok, I tried that in different ways, all with different restults. Here are the results:

1. Tried with _posts/ directory in photos/ directory and with index.html (identical to main index.html) in it. result: Identical to main page, not with posts in /photos/_posts/

2. Tried with no index.html. Result: Local testing I get 403 and remote testing I get a semi-blank page, like the index page but with no posts.

Mark Szymanski

unread,
Jan 22, 2011, 8:31:41 PM1/22/11
to jeky...@googlegroups.com
And, also. If this makes a difference. Posts in the '/photos/_posts' directory happen to show up in the RSS feed.
--------------------------------------------
Q: Why is this email three sentences or less?
A: http://three.sentenc.es

Mark Szymanski

unread,
Jan 23, 2011, 6:10:48 PM1/23/11
to jeky...@googlegroups.com
I got it working. I just set up a category for the photos and limited my /photos/ index page to only deal with posts in the "photos" category by using an "if" block and I used an "unless" block to keep the main index page from showing photos.

For example:

Main index page:

{% unless post.category == "photo" %}
{% comment %} Display posts… {% endcomment %}
{% endunless %}

For the photo page just replace "unless" with "if" and "endunless" with "endif".

Mark Szymanski

unread,
Jan 21, 2011, 6:11:22 PM1/21/11
to jekyll.rb
I tried that, but it just shows posts from the main _posts directory
instead of the ones inside the photos directory.

On Jan 21, 7:53 am, Krzysztof Wojciechowski <kwpol...@gmail.com>
wrote:
> > jekyll-rb+...@googlegroups.com<jekyll-rb%2Bunsubscribe@googlegroups .com>
> > .

Mark Szymanski

unread,
Jan 21, 2011, 5:47:47 PM1/21/11
to jekyll.rb
Hi,

I tried that, and whenever I go to localhost:8080/photos, I get the
same set of posts as my index page.

On Jan 21, 7:53 am, Krzysztof Wojciechowski <kwpol...@gmail.com>
wrote:
> > jekyll-rb+...@googlegroups.com<jekyll-rb%2Bunsubscribe@googlegroups .com>
> > .

Surajram Kumaravel

unread,
Jan 29, 2011, 1:07:17 AM1/29/11
to jeky...@googlegroups.com
I assign categories to my photos, and then use this to filter the two
most recent photos out.

{% for post in site.categories.photos limit:2 %}

> To unsubscribe from this group, send email to jekyll-rb+...@googlegroups.com.


> For more options, visit this group at http://groups.google.com/group/jekyll-rb?hl=en.
>
>

--
Thanks & Regards
Surajram Kumaravel
http://www.surajram.com

Reply all
Reply to author
Forward
0 new messages