Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gma/nesta-rails
The easiest way to use Nesta in a Rails app
https://github.com/gma/nesta-rails
nesta plugin ruby-on-rails
Last synced: 28 days ago
JSON representation
The easiest way to use Nesta in a Rails app
- Host: GitHub
- URL: https://github.com/gma/nesta-rails
- Owner: gma
- License: mit
- Created: 2011-10-04T08:21:08.000Z (about 13 years ago)
- Default Branch: main
- Last Pushed: 2022-07-29T12:43:26.000Z (over 2 years ago)
- Last Synced: 2023-04-10T08:57:32.504Z (over 1 year ago)
- Topics: nesta, plugin, ruby-on-rails
- Language: Ruby
- Homepage: http://nestacms.com/
- Size: 54.7 KB
- Stars: 17
- Watchers: 3
- Forks: 1
- Open Issues: 13
-
Metadata Files:
- Readme: README.md
- License: MIT-LICENSE
Awesome Lists containing this project
README
nesta-rails
===========nesta-rails is a Rails plugin that seamlessly integrates [Nesta CMS][]
into your Rails application. Rather than mounting Nesta as a Rack
application alongside your Rails application, it replaces Nesta's
Sinatra actions with a Rails controller that uses Nesta's library code
to render the files in your content/pages directory.[Nesta CMS]: http://nestacms.com
Installation
------------Add the `nesta-rails` gem to your Rails project's `Gemfile` and re-run
Bundler, like this:$ echo "gem 'nesta-rails'" >> Gemfile
$ bundleNow you can generate a controller, a helper, and a default template for
rendering your pages. The generator will automatically add some routes
to `config/routes.rb` for you.$ rails generate nesta
create config/initializers/nesta.rb
create app/controllers/nesta_controller.rb
create app/helpers/nesta_helper.rb
create app/views/nesta/page.html.haml
create app/views/nesta/atom.haml
create app/views/nesta/sitemap.haml
route mount NestaController.action(:show), :at => '/'
route match 'sitemap.xml' => 'nesta#sitemap'
route match 'articles.xml' => 'nesta#feed'Move the new routes to the bottom of `config/routes.rb` to ensure that
Nesta isn't asked to serve pages that should be handled by other
controllers in your application.That's it - nesta-rails is installed.
It's now up to you to update your templates/CSS accordingly, but Nesta's
content should be rendered within your Rails app's application layout...If you want to make changes to the generated controllers and helpers, go ahead.
That's why they're generated; you'll probably want to hack on them at some
point.License
-------This project is released under the MIT-LICENSE.