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
rake 0.8.3
hpricot http://github.com/why/hpricot/
These tasks are designed to use a freemind mindmap and help populate a page tree structure with the pages your client wants.
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]
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.
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.
To create the following basic snippets run this rake task
rake create:snippets
- head
- main-navigation
- sub-nav
- footer
To create the following basic layouts run this rake task
rake create:layouts
- home-layout
- interior-layout
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.
Check out the examples folder to see what a mind-map looks like, and the html it generates.
MIT License, under the same terms as Ruby.