Skip to content
davydotcom edited this page Feb 17, 2012 · 1 revision

Spud Blog Supports several configuration options in your environment.rb file.

Spud::Blog.configure do |config|
    config.base_layout = "application"
    config.news_enabled = false
    config.blog_enabled = true
    config.posts_per_page = 5
    config.blog_path = 'blog'
    config.news_path = 'news'
    config.enable_sitemap = true
end

The above code block could be copied in your environment.rb file as these are the default values. But what do they all do you may ask?

config.base_layout = "application"

This defines the base layout to be used when rendering blog or news pages. In the future this may be split into 2 separate layout configuration options for both blog and news.

config.news_enabled = false

Somes sites have news, and others have blogs. News pages do not have commenting in the spud_blog engine while blog pages do. Both news and blog support post categories. While news is very similar to blog, we keep them as separate administrative sections to make it easier for the user to figure out what they need to do to make changes.

config.blog_enabled = true

Somes sites have news, and others have blogs. News pages do not have commenting in the spud_blog engine while blog pages do. Both news and blog support post categories. While news is very similar to blog, we keep them as separate administrative sections to make it easier for the user to figure out what they need to do to make changes.

config.posts_per_page = 5

This configuration option configures how many posts/news articles are rendered on a given page.

config.blog_path = 'blog'

This option allows you to change the url route for which the blog will be rendered.

config.news_path = 'news'

This option allows you to change the url route for which the news will be rendered.

Clone this wiki locally