Closed tdreyno closed 11 years ago
The only issue there is that there are a lot of blog settings.
What do we want - just multiple [source, permalink] pairs, or completely separate blogs (different tag/calendar template, etc)? If it's the latter I'd just recommend people make separate middleman projects. If it's the former, it'd be pretty easy to do.
I can see a situation where you have 1 "site" project, such as a company website, with normal pages, and maybe a designer and a developer blog. I suppose you could have a couple MM projects and some script to coordinate building them all.
I'm not even sure activate
can be called twice for the same extension right now.
We should do this in 3.1:
activate :blog do |blog|
blog.permalink = "blog1/:year/:month/:day/:title.html"
end
I like that idea.
+1
Will be a lot easier with the new extension class api (3.1) which uses instances for each activated extension.
+1, many companies have blogs and press pages (which are essentially blogs)
+1 With this ability it will be possible organize the translated version of blog.
I can do
activate :blog do |blog|
blog.prefix = 'blog1'
end
activate :blog do |blog|
blog.prefix = 'blog2'
end
Things seem to work, but unfortunately the tags and calenders of two blogs are mixed up, which defeat the purpose.
Is somebody working on this? I would love to use it to differ between blog and journal. Or is there any other to achieve something like this?
Nobody's working on it. Feel free to take it on!
On Nov 14, 2012, at 9:30 AM, "Ole Krüger" notifications@github.com wrote:
Is somebody working on this? I would love to use it to differ between blog and journal. Or is there any other to achieve something like this?
— Reply to this email directly or view it on GitHubhttps://github.com/middleman/middleman-blog/issues/37#issuecomment-10375307.
I am not so firm with ruby, and completely unfamiliar with the MM plugin system. Can you suggest some good reads to get started with the plugins?
You should look at the code in this repository, and how activate
works in https://github.com/middleman/middleman/blob/master/middleman-core/lib/middleman-core/core_extensions/extensions.rb. http://middlemanapp.com/extensions/custom/ has general info on the extension system.
I would like to activate the extension multiple times like:
activate :blog do |blog|
blog.prefix = 'blog1'
end
activate :blog do |blog|
blog.prefix = 'blog2'
end
and dynamically add methods to the Blog module
based on the prefixes.
Any thoughts on this?
This might be dependent on my 3.1 refactoring of the extension system, which allows each extension to have its own instance instead of being a singleton on the Application
. https://github.com/middleman/middleman/pull/460
Nice to see this idea running. I was thinking about porting my site from Jekyll to MiddleMan. I have four blogs with jekyll. So, I will have to wait until this feature exists to make the move. Meanwhile I will be learning more about Middleman.
Thanks.
Anyone know if there has been much movement on this feature recently?
Nope. We're in a rough place. The volume of minor issues, and simply responding to questions, is eating up most of our time. New feature development is very slow.
The Plan is:
Ok cool. Open to help on the project? — Sent from Mailbox for iPhone
On Thu, Feb 21, 2013 at 10:27 AM, Thomas Reynolds notifications@github.com wrote:
Nope. We're in a rough place. The volume of minor issues, and simply responding to questions, is eating up most of our time. New feature development is very slow. The Plan is:
- ship bugfix 3.0.12 this week.
- beta and ship all changes from master (more dangerous, possibly backwards incompatibilities which need to be found)
- Start work on new extension system for 3.1
* Use that system for multi-blog.
Reply to this email directly or view it on GitHub: https://github.com/middleman/middleman-blog/issues/37#issuecomment-13901391
So much :) Email me if you've got any questions or need any direction. We've got a pretty open commit policy. You want to help, you're in!
Another use case I've found is using the blog features for a portfolio. It seemed a great fit, but now no blog! ;-(
+1
This work is in-progress: https://github.com/middleman/middleman-blog/commit/c97ca96497432bbca11572901c93323a1e636512
any idea when this will get into master?
This is in.
Fantastic! I'm trying it now, I haven't seen any documentation on multiple blogs, but I will try to document with my findings if I have time.
Any tips on how to get started using multiple blogs?
@cockroachbill , @joallard , using multiple blogs is intuitive as:
activate :blog do |blog|
blog.name = 'blog1'
blog.prefix = 'blog1'
# blablablah.....
end
activate :blog do |blog|
blog.name = 'blog2'
blog.prefix = 'blog2'
# blablablah.....
end
One must specify the name of blog, it's the unique id of a blog for later reference. If you don't specify one, middleman-blog will generate one based on the sequential number. See https://github.com/middleman/middleman-blog/blob/master/lib/middleman-blog/extension_3_1.rb , line 65
in after_configuration
.
The code in extension_3_1.rb
is quite self explained, options, helpers, resource_list_manipulators, basically everything you need.
It's easy to figure out we should now write:
blog('blog1').tags.each
where we wrote:
blog.tags.each
I'm currently moving my old multiple blog workaround (just iterating sitemap and blahblah) to the new official multiple blog support, and hoping to write some documentation along the way.
In the meantime, I'm encountering issue #166 and hoping to solve it somehow.
I'm thinking we should re-org our internals a little more. @bhollis has already done a ton.
I think we need a root Blog class which is initialized with a hash, instead of the
set
variable methods.Old format:
New format: