Git Product home page Git Product logo

radiant-content-creator's Introduction

Radiant CMS Content Creator Rake Tasks

Rake tasks for use with Radiant CMS designed speed up building and populating a Radiant site quickly and painlessly.

To use in Radiant site:

git clone git://github.com/scullygroup/radiant-content-creator.git vendor/plugins/content_creator

Requirements

rake 0.8.3
hpricot http://github.com/why/hpricot/

Page Generation Tasks

These tasks are designed to use a freemind mindmap and help populate a page tree structure with the pages your client wants.

Create Pages from html files generated with Freemind

Freemind is a mind-mapping software that can be used to create sitemaps for large complicated websites. Before a site makes it to Radian CMS, create a mindmap of your page structure with child named “primary navigation” with all your Radiant pages named as you would name the title of the page ex: “Shake and Bake” In these titles anything you put in ()‘s will be filtered out by the system, this is by design so you can put comments in the title and they won’t transfer over to the Radiant pages. You can then export the mindmap as xhtml with javascript from Freemind. File > Export > As XHTML (Javascript Version), and save that file to your public folder in your Radiant Site. You can save it as the default the rake task uses “sitemap.html” or a custom name, and then pass the argument in the rake task.

If you add to a sitemap.html, the task will let you know those pages existed and only create the new pages. If you rename a page it will create a new page, it will not rename the existing page and will never remove pages.

Load pages from “/public/sitemap.html” to the radiant site root “/” that are children of the “primary-navigation” node in your sitemap.html see examples/ for example structure.

rake create:page:fromhtml

Load pages from “/public/filename.html” to the radiant site root.

rake create:page:fromhtml[filename.html]

Create single pages

To add a single page without having to use the admin interface:

rake create:page:child[title,/path-to-a-radiant/page-parent]

Creates a single page as a child of the passed url, default page url is “/” This task also fills in 2 paragraphs of lorem ipsum.

Snippet/Layout Generation

The default snippets with each “design” radiant provides are a good start, but these provide a nice general structure to a blank radiant loadout. Very minimal with only basic doctype and typical JS inclusion.

Snippets

To create the following basic snippets run this rake task

rake create:snippets

  • head
  • main-navigation
  • sub-nav
  • footer

Layouts

To create the following basic layouts run this rake task

rake create:layouts

  • home-layout
  • interior-layout

Why Freemind?

Freemind mind-maps are quick, easy and free. The generated files are always consistent a therefore much easier to parse and the rake tasks are less error prone. You could generate the html by hand, but the whole idea behind Rake n’ Bake is to get it done ASAP. With Freemind you can show a client, visually, a list of all their pages and within minutes have them editable in Radiant. Creating 150 pages with many parent child relationships via the admin interface is no fun.

Confused?

Check out the examples folder to see what a mind-map looks like, and the html it generates.

License

MIT License, under the same terms as Ruby.

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.