0.0
No commit activity in last 3 years
No release in over 3 years
Integrates Pollypost with nanoc.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.7
~> 10.0

Runtime

~> 1.2.0
~> 2.0.1
~> 3.7.5
~> 1.4.5
 Project Readme

Nanoc::Polly

Integrate Pollypost with nanoc!

This Ruby Gem provides a backend for Pollypost, so you can use browser based inline editing on static sites generated with nanoc.

Installation

Install nanoc-polly yourself as:

$ gem install nanoc-polly

Or, if you're using Bundler, add this line to your application's Gemfile:

gem 'nanoc-polly'

And then execute:

$ bundle install

Development version

In case you want to use the most up-to-date development version, add this GitHub path to your Gemfile:

gem 'nanoc-polly', :github => 'pollypost/nanoc-polly'

or, if you cloned the source files to your local file system:

gem 'nanoc-polly', :path => './path_to/nanoc-polly'

Polly Helper

Nanoc-polly comes with a predefined helper that adds functionality for generating the 'about' tags needed for Pollypost. See Pollypost for details.

To activate the helper, add this line to a file in your lib folder:

include Nanoc::Helpers::Polly

You can then generate a file's 'about' value with item_about @item:

<div class="edit-this" about="<%= item_about @item %>">
  <%= yield %>
</div>

Usage

To enable Pollypost on your site, just start the nanoc webserver with

$ nanoc edit -a

This behaves very similar to nanoc view but adds all the components needed for Pollypost. The -a Option loads all the assets shipped with Pollypost, without it you'd have to make sure yourself that the files are found on the specified path (see Config Options).

Your site is available at localhost:3000.

For additional options try nanoc edit --help.

Config Options

In your nanoc.yaml file you can set the following configuration options for Pollypost (shown here are their default values):

polly:
  assets_location: 'public/polly'       # folder where the compiled Pollypost assets are stored
  assets_path_prefix: '/polly/assets/'  # url prefix for Pollypost asset paths
  backend_path_prefix: '/polly/'        # url prefix for Pollypost backend paths
  image_storage: ''                     # which image storage to use (e.g. 'uploadcare')
  uploadcare_api_key: ''                # api key if you are using uploadcare as image storage

Contributing

  1. Fork it ( https://github.com/pollypost/nanoc-polly/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

License

Copyright (C) 2015 more onion

Pollypost is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

Pollypost is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License (LICENSE.md) along with this program. If not, see http://www.gnu.org/licenses/.