Giter Site home page Giter Site logo

thomasbush / spina-articles Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wearefuze/spina-articles

0.0 2.0 0.0 33 KB

Simple plugin for a news or blog within Spina CMS

License: MIT License

Ruby 70.39% HTML 26.12% JavaScript 1.83% CSS 1.67%

spina-articles's Introduction

Spina CMS

Visit the website

Getting Started

This is a News/Blog plugin for Spina CMS based on articles.

gem 'spina-articles'

Run the migration installer to get started.

rails g spina_articles:install

This should copy the migration file required to create the Spina::Article model.

Restart your server and head over to '/admin', you should see your plugin located below the Media Library.

That's all it takes to get the plugin working :)

Consumer views

Note: This plugin does not include the controller or view for the customer facing website, just the admin only.

To get you going you'll need to add the routes:

Spina::Engine.routes.draw do
    resources :articles, only: [:show, :index]
end

Then create the the controller articles_controller.rb inside controllers > spina > articles and include your index and show actions:

def index
  @articles = Spina::Article.order(created_at: :desc).all
end

def show
  @article ||= Article.find_by(slug: params[:id])
end
TODO: Create categories and tagging

This project rocks and uses MIT-LICENSE.

spina-articles's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.