Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

couch_blog

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

couch_blog

  • 0.6.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

couch_blog

Build Status

Rails 4 Blog engine using SimplyStored as CouchDB orm

Implement

Gemfile

A normal Gemfile now would look like:

gem 'simply_stored', github: 'bterkuile/simply_stored'
gem 'cmtool'
gem 'couch_blog'

Custom layout

You may want to use a custom layout, more fitting together with your cmtool website. Therefore implement the following in your app/controllers/application_controller.rb to render your custom created layout at location app/views/layouts/blog.html.slim

class ApplicationController < ActionController::Base

  def couch_blog_render
    @page = Page.find_by_name('blog') || Page.new(name: 'blog', locale: I18n.locale)
    {layout: "blog"}
  end

end

Custom view

To create a custom view, create a file eg: app/views/couch_blog/posts/index.htmlhaml

having your custom content:

- for post in @posts
  .post
    .date
      %span.month= post.date.strftime('%b')
      %span.day= post.date.day
      %span.year= post.date.year
    %h2.title= link_to post.title, couch_blog.post_path(post.id, post.title.to_s.downcase.gsub(/[_\W]+/, '-'))
    .post-body=raw post.body

FAQs

Package last updated on 22 Jul 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc