Hi,- I was searching for a Ruby-powered CMS and found Nesta. Looks very nice! Hope you can answer a couple of questions before I decide to dive headlong into it. 1) Heroku seems to be the obvious choice for hosting, but who is hosting the email accounts? I'd be very interested in hearing what email service people are using with their Nesta Heroku set-up. 2) Is it possible to upload files to a Nesta-powered site? What about sending data from email forms (like ordinary "Contact Us" forms)? (I have a website that currently runs on ExpressionEngine (sort of) where that type of thing is possible: http://jamesabbottdd.com/) Thanks beforehand! Cheers, James
James, I've found the I Did It My Way <http://ididitmyway.heroku.com/> blog extremely useful during my experimenting with Sinatra and nesta. One of the posts walks you through the process of setting up a contact form<http://ididitmyway.heroku.com/past/2010/12/4/an_email_contact_form_in_sinatra/>in sinatra that will use gmail + pony on your development machine and sendgrid when deployed at heroku. Warmly, Aaron On Thu, Feb 3, 2011 at 2:27 AM, James Abbott <abbottjam@gmail.com> wrote: > Hi,- > > I was searching for a Ruby-powered CMS and found Nesta. Looks very nice! > Hope you can answer a couple of questions before I decide to dive headlong > into it. > > 1) Heroku seems to be the obvious choice for hosting, but who is hosting > the email accounts? I'd be very interested in hearing what email service > people are using with their Nesta Heroku set-up. > 2) Is it possible to upload files to a Nesta-powered site? What about > sending data from email forms (like ordinary "Contact Us" forms)? > > (I have a website that currently runs on ExpressionEngine (sort of) where > that type of thing is possible: http://jamesabbottdd.com/) > > Thanks beforehand! > Cheers, > James >
Hey Aaron,- many thanks for the link, looks really promising! I think I'll give it a go with Nesta & Sinatra. Will be rolling out my site with it as a parallel/duplicate site to my existing one, learning in the process. Right now I'm at a point where I've invested (a bit more than) a couple of weeks into learning ExpressionEngine, but PHP+mySQL have never really been my cup of tea. So I'll take it easy with stepwise migration - achieving total control with art-directed layouts for individual pages is a particular focus of mine - and then jump in with both feet. Cheers, James On Thu, Feb 3, 2011 at 4:23 PM, Aaron Stroud <astroud@gmail.com> wrote: > James, > > I've found the I Did It My Way <http://ididitmyway.heroku.com/> blog > extremely useful during my experimenting with Sinatra and nesta. One of the > posts walks you through the process of setting up a contact form<http://ididitmyway.heroku.com/past/2010/12/4/an_email_contact_form_in_sinatra/>in sinatra that will use gmail + pony on your development machine and > sendgrid when deployed at heroku. > > Warmly, > Aaron > > > On Thu, Feb 3, 2011 at 2:27 AM, James Abbott <abbottjam@gmail.com> wrote: > >> Hi,- >> >> I was searching for a Ruby-powered CMS and found Nesta. Looks very nice! >> Hope you can answer a couple of questions before I decide to dive headlong >> into it. >> >> 1) Heroku seems to be the obvious choice for hosting, but who is hosting >> the email accounts? I'd be very interested in hearing what email service >> people are using with their Nesta Heroku set-up. >> 2) Is it possible to upload files to a Nesta-powered site? What about >> sending data from email forms (like ordinary "Contact Us" forms)? >> >> (I have a website that currently runs on ExpressionEngine (sort of) where >> that type of thing is possible: http://jamesabbottdd.com/) >> >> Thanks beforehand! >> Cheers, >> James >> > >
> So I'll take it easy with stepwise migration - achieving total control
with art-directed layouts for individual pages is a particular focus of
mine - and then jump in with both feet.
In that case, this might be of interest to you:
http://blog.peepcode.com/tutorials/2010/about-this-blog
Glenn
*Graham: * I'm going to try it out and then post when I have questions / ideas, I promise. There are already a couple of ideas that have sprung to mind, for example it would be nice to have an "Editors Pick" feature for blog entries so that one can display certain entries preferentially, achieving a magazine-style look. Something like this: http://stuffandnonsense.co.uk/blog One could of course make "editors pick" a category, but that would introduce nesting issues and is conceptually not clean in my humble opinion. I've been looking for a fast, lightweight CMS with designer freedom and the ability to turn a site into a high-end publication, with art-directed pages and fine-grained publication control. It's exciting to find a candidate in the face of Nesta! (Oh, did I mention that I dislike PHP)? *Glenn:* I've seen that page - the main Nesta page has taken me there. Impressive. Cheers, James On Thu, Feb 3, 2011 at 5:18 PM, Glenn Gillen <glenn@rubypond.com> wrote: > So I'll take it easy with stepwise migration - achieving total control with > art-directed layouts for individual pages is a particular focus of mine - > and then jump in with both feet. > > > In that case, this might be of interest to you: > http://blog.peepcode.com/tutorials/2010/about-this-blog > > Glenn >
On 3 Feb 2011, at 17:00, James Abbott <abbottjam@gmail.com> wrote:
> it would be nice to have an "Editors Pick" feature for blog entries so
that one can display certain entries preferentially,
Then I think you're going to like a couple of new features in the gem;
that'll be really easy.
I'll push nestacms.com to github tonight; serves as a reasonable example.
On 3 Feb 2011, at 17:14, Graham Ashton wrote: > On 3 Feb 2011, at 17:00, James Abbott <abbottjam@gmail.com> wrote: > >> it would be nice to have an "Editors Pick" feature for blog entries so that one can display certain entries preferentially, > > Then I think you're going to like a couple of new features in the gem; that'll be really easy. > > I'll push nestacms.com to github tonight; serves as a reasonable example. I've just pushed it. If you try and run this site with the 0.9.3 gem it may/may not work (I've got a couple of changes locally that I've not released yet), and it won't look great as I've not finished the CSS. But that's besides the point. The markup still serves as a reasonable example of what I was thinking. https://github.com/gma/nestacms.com Have a look at the home page: https://github.com/gma/nestacms.com/blob/master/content/pages/index.haml It uses the views/home.haml template (which is chosen on the second line), and has no blog content on it at all. The list of recent blog articles is here: https://github.com/gma/nestacms.com/blob/master/content/pages/blog/index.haml The contents of pages/blog/index.hmal could also have been saved in pages/blog.haml (the two files are equivalent). To display a featured article above all the others you'd just need to call the article_summaries helper method, and pass it a list of one article; the one that's featured. The Haml might look something like this (it's HTML5, but you could obviously use div tags just as easily): %section.featured = article_summaries([Nesta::Page.find_by_path('/foo')]) %section.articles = article_summaries(latest_articles) All you'd need to do then is style it accordingly. The docs for the gem are all written in Markdown, so you can get a fair rendition of them out of GitHub. Before the new site goes live, it'll be better than nothing: https://github.com/gma/nestacms.com/tree/master/content/pages/docs I'll be working on them some more tomorrow. Graham
On 3 Feb 2011, at 15:56, James Abbott <abbottjam@gmail.com> wrote:
> achieving total control with art-directed layouts for individual pages
is a particular focus of mine - and then jump in with both feet.
The template and layout metadata (that you can set at the top of each
page) make that a lot easier to achieve than it used to be. Let us know if
you've got any questions about how to do stuff...
> 1) Heroku seems to be the obvious choice for hosting, but who is hosting the email accounts? I'd be very interested in hearing what email service people are using with their Nesta Heroku set-up. For sending email you've got Gmail if the numbers are small: http://docs.heroku.com/smtp (keep in mind they're Rails specific instructions, so adapt accordingly based on what gem you use to handle mail) Otherwise as Graham said, take a look at the sendgrid plugin. I don't do much in the way of transactional emails, just mailing list type stuff so I use Mailchimp for that. As for receiving emails, I'm using Google Apps. > 2) Is it possible to upload files to a Nesta-powered site? What about sending data from email forms (like ordinary "Contact Us" forms)? Yes, but you need to remember that you don't have disk access on Heroku so it would probably be best to look at how you save files to Amazon S3 in ruby. Hope that helps, Glenn
Awesome Glenn, thanks. On Thu, Feb 3, 2011 at 12:30 PM, Glenn Gillen <glenn@rubypond.com> wrote: > 1) Heroku seems to be the obvious choice for hosting, but who is hosting > the email accounts? I'd be very interested in hearing what email service > people are using with their Nesta Heroku set-up. > > > For sending email you've got Gmail if the numbers are small: > http://docs.heroku.com/smtp (keep in mind they're Rails specific > instructions, so adapt accordingly based on what gem you use to handle mail) > > Otherwise as Graham said, take a look at the sendgrid plugin. I don't do > much in the way of transactional emails, just mailing list type stuff so I > use Mailchimp for that. As for receiving emails, I'm using Google Apps. > > 2) Is it possible to upload files to a Nesta-powered site? What about > sending data from email forms (like ordinary "Contact Us" forms)? > > > Yes, but you need to remember that you don't have disk access on Heroku so > it would probably be best to look at how you save files to Amazon S3 in > ruby. > > Hope that helps, > > Glenn >
On 3 Feb 2011, at 10:27, James Abbott wrote: > 1) Heroku seems to be the obvious choice for hosting, but who is hosting the email accounts? I'd be very interested in hearing what email service people are using with their Nesta Heroku set-up. I've never sent email from a Nesta site, but if I was running on Heroku I suspect I'd use their Sendgrid add-on. http://docs.heroku.com/sendgrid I'd look at Pony or net/smtp, both of which would be easy to hook into Nesta (and are mentioned at the bottom of that page). > 2) Is it possible to upload files to a Nesta-powered site? What about sending data from email forms (like ordinary "Contact Us" forms)? Nesta is really just a thin wrapper around Sinatra. If you're thinking about handling forms, you can handle HTTP POST requests easily by adding your own Sinatra code. You could pull Pony or net/smtp into a post action. http://sinatra-book.gittr.com/#http_methods If you're wondering where to put your code, it'll either be local/app.rb (if you're cloning the github repo, as currently documented on the web site), or just in app.rb (if you're using the gem, for which I've not finished the docs yet -- but am working on them today). Don't worry about holding off until the gem is ready; switching to it once I've sorted the remaining docs out will be easy. Does that cover it? Cheers, Graham
Hi Graham,- yep, that pretty much covers it thanks. I've only made Rails apps before though so no Sinatra experience. Would it be possible to redefine the URL format to include the date (mysite/category/year/month/day/name-of-entry)? Cheers, James On Thu, Feb 3, 2011 at 11:51 AM, Graham Ashton <graham@effectif.com> wrote: > On 3 Feb 2011, at 10:27, James Abbott wrote: > > > 1) Heroku seems to be the obvious choice for hosting, but who is hosting > the email accounts? I'd be very interested in hearing what email service > people are using with their Nesta Heroku set-up. > > I've never sent email from a Nesta site, but if I was running on Heroku I > suspect I'd use their Sendgrid add-on. > > http://docs.heroku.com/sendgrid > > I'd look at Pony or net/smtp, both of which would be easy to hook into > Nesta (and are mentioned at the bottom of that page). > > > 2) Is it possible to upload files to a Nesta-powered site? What about > sending data from email forms (like ordinary "Contact Us" forms)? > > Nesta is really just a thin wrapper around Sinatra. If you're thinking > about handling forms, you can handle HTTP POST requests easily by adding > your own Sinatra code. > > You could pull Pony or net/smtp into a post action. > > http://sinatra-book.gittr.com/#http_methods > > If you're wondering where to put your code, it'll either be local/app.rb > (if you're cloning the github repo, as currently documented on the web > site), or just in app.rb (if you're using the gem, for which I've not > finished the docs yet -- but am working on them today). Don't worry about > holding off until the gem is ready; switching to it once I've sorted the > remaining docs out will be easy. > > Does that cover it? > > Cheers, > Graham >
On 3 Feb 2011, at 11:29, James Abbott wrote:
> Would it be possible to redefine the URL format to include the date
(mysite/category/year/month/day/name-of-entry)?
If you want to do it, the easiest way is to create the relevant folder
structure under content/pages.
So something like content/pages/2010/12/23/name-of-entry.mdown.
You could also write some Ruby code that searched for a file called
name-of-entry.mdown inside a pages/articles directory (which doesn't
exist; I'm making this up as I go), and then checked that the date
matched. Nesta doesn't do this because I don't like dates in URLs, and
because it wouldn't be as flexible. That doesn't make it a bad idea, and
it wouldn't be very much code. If you fancy it, read up on "splat" in the
Sinatra docs to find out how to pull the date out of the URL.
This is just my personal opinion, but I think that kind of URL structure
is a hangover from the days when blogs were quite new and many people
hadn't caught on to the idea that your URLs are part of your user
interface. The dates don't add significant value. It's also worth
mentioning that search engines look at the text in your URLs. If a URL
includes words that people are searching for, that helps you rank higher.
I suspect that the higher the "keyword density" in a URL the better, and
in that context the numbers are just noise.
If you've got such URLs in place on a different CMS you can either keep
them by creating all the relevant directories, or put some 301 redirects
in place to map them to new URLs that don't contain dates. Six of one,
half a dozen of the other.
Graham
Hi Graham,- thanks for addressing my questions in such detail, that's awesome. I pulled Nesta to my machine yesterday and explored the publishing / editing features. Here's what I really like: Great that I can just write stuff in my editor of choice, and "publish by uploading". I've found on more than one occasion that the chrome and the UI of web-based editors distract from the task of authoring, publishing, and editing content. It's a clever thought to delegate this task to an external editor (which our hypothetical writer likely is using precisely because he's most productive in it). It's also a good reaffirmation of the old Unix philosophy that underneath, everything is just text file driven. Plain, flexible, & fast. I like that. Great that you can mix plain text and html tags. I wrote some text and then embedded a code snip inside pre and code tags; it worked. Again, a major productivity boost. I've noticed that on the demo page, the URL structure is home/bananas and not home/fruit/bananas, although /fruit is a category. Is that because the files are all under the same folder? Over the next few days I'll push it to Heroku and will start building it out, browse the docs and the source, etc. Now on to the "featured articles" feature: To display a featured article above all the others you'd just need to call > the article_summaries helper method, and pass it a list of one article; the > one that's featured. The Haml might look something like this (it's HTML5, > but you could obviously use div tags just as easily): > > %section.featured > = article_summaries([Nesta::Page.find_by_path('/foo')]) > %section.articles > = article_summaries(latest_articles) > All right - I assume that if I want to feature several articles, that would become: %section.featured = article_summaries([Nesta::Page.find_by_path('/foo')]) = article_summaries([Nesta::Page.find_by_path('/bar')]) = article_summaries([Nesta::Page.find_by_path('/baz')]) %section.articles = article_summaries(latest_articles) This is just my personal opinion, but I think that kind of URL structure is > a hangover from the days when blogs were quite new and many people hadn't > caught on to the idea that your URLs are part of your user interface. The > dates don't add significant value. It's also worth mentioning that search > engines look at the text in your URLs. > I see the point. Dates in URLs probably don't matter much SEO-wise, you're right. But they could be useful from a human-centric perspective, in that they (this is rather hypothetical) help one form a mental hook to the topic of the article along with the publication date (or at least, the "year" part of the date). Like in: "that article about no-SQL apps from December 2010". (Btw, this is how 24ways have chosen to implement dates in URLs - year and title - which tends to confirm my theory: http://24ways.org/2010/intro-to-css-3d-transforms). But it's good that Nesta provides a way to overrule the default (by using directories), and then there are all the hacks of course. Cheers, James PS. I've become rather enamored with the idea of authoring a theme for Nesta - already have some styles and markup. Let's see... On Fri, Feb 4, 2011 at 3:27 AM, Graham Ashton <graham@effectif.com> wrote: > On 3 Feb 2011, at 11:29, James Abbott wrote: > > > Would it be possible to redefine the URL format to include the date > (mysite/category/year/month/day/name-of-entry)? > > If you want to do it, the easiest way is to create the relevant folder > structure under content/pages. > > So something like content/pages/2010/12/23/name-of-entry.mdown. > > You could also write some Ruby code that searched for a file called > name-of-entry.mdown inside a pages/articles directory (which doesn't exist; > I'm making this up as I go), and then checked that the date matched. Nesta > doesn't do this because I don't like dates in URLs, and because it wouldn't > be as flexible. That doesn't make it a bad idea, and it wouldn't be very > much code. If you fancy it, read up on "splat" in the Sinatra docs to find > out how to pull the date out of the URL. > > This is just my personal opinion, but I think that kind of URL structure is > a hangover from the days when blogs were quite new and many people hadn't > caught on to the idea that your URLs are part of your user interface. The > dates don't add significant value. It's also worth mentioning that search > engines look at the text in your URLs. If a URL includes words that people > are searching for, that helps you rank higher. I suspect that the higher the > "keyword density" in a URL the better, and in that context the numbers are > just noise. > > If you've got such URLs in place on a different CMS you can either keep > them by creating all the relevant directories, or put some 301 redirects in > place to map them to new URLs that don't contain dates. Six of one, half a > dozen of the other. > > Graham >
On 5 Feb 2011, at 12:02, James Abbott wrote: > ... authoring, publishing, and editing content. It's a clever thought to delegate this task to an external editor Cheers (though I think the main reason there isn't a UI is just that nobody has made one). > Great that you can mix plain text and html tags. I wrote some text and then embedded a code snip inside pre and code tags; it worked. Again, a major productivity boost. If you're in markdown you can also do pre tags by indenting a paragraph by 4 spaces. It's also quite useful to be able to do markdown in Haml; handy if you want to use HTML5 tags but don't want to put all the p tags in by hand. %section %heading %h1 Page heading :markdown Normal markdown goes here... > I've noticed that on the demo page, the URL structure is home/bananas and not home/fruit/bananas, although /fruit is a category. Is that because the files are all under the same folder? Yes; the URLs are determined by which folders the files are in. It means you're free to choose which categories a page belongs to, without having to put it in a specific location. The demo files created by the sample_content rake task will probably get replaced by this (which has some better examples in it): https://github.com/gma/nesta-demo-content I made that to work with the gem, but it might run fine if you're using the master branch. > I assume that if I want to feature several articles, that would become: > > %section.featured > = article_summaries([Nesta::Page.find_by_path('/foo')]) > = article_summaries([Nesta::Page.find_by_path('/bar')]) > = article_summaries([Nesta::Page.find_by_path('/baz')]) > %section.articles > = article_summaries(latest_articles) Nearly. I'd probably add a featured articles helper to local/app.rb, like this: def featured_articles %w[/foo /bar /baz].map { |path| Nesta::Page.find_by_path(path) } end And then you can just put this in the template: %section.featured = article_summaries(featured_articles) %section.articles = article_summaries(latest_articles) It'd be nicer still to store the information about which articles are featured to each article's metadata. If you use the gem you'll find that each page object has a public metadata method, so you can poke around in the page metadata yourself. If your page started with: Featured: true You could access 'true' (it would be a string) by referencing page_object.metadata('featured'). Boolean settings on pages come up every now and again. Perhaps I should add support for them with one metadata key. Something like this: Flags: featured > http://24ways.org/2010/intro-to-css-3d-transforms). I agree that the year is quite useful; it's far better than what I used to do: http://effectif.com/articles/deploying-sinatra-with-vlad > PS. I've become rather enamored with the idea of authoring a theme for Nesta - already have some styles and markup. Let's see... :-)
Hi Graham,- trying to push the CMS to Heroku here, and a couple of questions arose. Firstly, creating a test page as you outlined in the guide ( http://effectif.com/nesta/deployment/heroku) does create the page (accessible through http://localhost:9393/test), but the index page ( http://localhost:9393/) doesn't show the new page in the list. Maybe I just didn't format it properly. Here's what it looks like: # Test page! > > Test page created with cat. > > Goodbye. > Another thing: running "rake heroku:config" resulted in this message: .../.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.10/lib/bundler/shared_helpers.rb:107:in > `block in cripple_rubygems': heroku is not part of the bundle. Add it to > Gemfile. (Gem::LoadError) > So I figured this must be a case of me having to add gem "heroku", "1.17.10" to the Gemfile and throwing away the Gemfile.lock, correct? (I have bundler, rvm, Ruby 1.9.2, and Rails 3.0.3 installed). And a final thing: is Disqus the only way to comment on articles? Cheers, James On Sat, Feb 5, 2011 at 1:35 PM, Graham Ashton <graham@effectif.com> wrote: > On 5 Feb 2011, at 12:02, James Abbott wrote: > > > ... authoring, publishing, and editing content. It's a clever thought to > delegate this task to an external editor > > Cheers (though I think the main reason there isn't a UI is just that nobody > has made one). > > > Great that you can mix plain text and html tags. I wrote some text and > then embedded a code snip inside pre and code tags; it worked. Again, a > major productivity boost. > > If you're in markdown you can also do pre tags by indenting a paragraph by > 4 spaces. > > It's also quite useful to be able to do markdown in Haml; handy if you want > to use HTML5 tags but don't want to put all the p tags in by hand. > > %section > %heading > %h1 Page heading > :markdown > Normal markdown goes here... > > > I've noticed that on the demo page, the URL structure is home/bananas and > not home/fruit/bananas, although /fruit is a category. Is that because the > files are all under the same folder? > > Yes; the URLs are determined by which folders the files are in. It means > you're free to choose which categories a page belongs to, without having to > put it in a specific location. > > The demo files created by the sample_content rake task will probably get > replaced by this (which has some better examples in it): > > https://github.com/gma/nesta-demo-content > > I made that to work with the gem, but it might run fine if you're using the > master branch. > > > I assume that if I want to feature several articles, that would become: > > > > %section.featured > > = article_summaries([Nesta::Page.find_by_path('/foo')]) > > = article_summaries([Nesta::Page.find_by_path('/bar')]) > > = article_summaries([Nesta::Page.find_by_path('/baz')]) > > %section.articles > > = article_summaries(latest_articles) > > Nearly. I'd probably add a featured articles helper to local/app.rb, like > this: > > def featured_articles > %w[/foo /bar /baz].map { |path| Nesta::Page.find_by_path(path) } > end > > And then you can just put this in the template: > > %section.featured > = article_summaries(featured_articles) > %section.articles > = article_summaries(latest_articles) > > It'd be nicer still to store the information about which articles are > featured to each article's metadata. If you use the gem you'll find that > each page object has a public metadata method, so you can poke around in the > page metadata yourself. > > If your page started with: > > Featured: true > > You could access 'true' (it would be a string) by referencing > page_object.metadata('featured'). > > Boolean settings on pages come up every now and again. Perhaps I should add > support for them with one metadata key. Something like this: > > Flags: featured > > > http://24ways.org/2010/intro-to-css-3d-transforms). > > I agree that the year is quite useful; it's far better than what I used to > do: > > http://effectif.com/articles/deploying-sinatra-with-vlad > > > PS. I've become rather enamored with the idea of authoring a theme for > Nesta - already have some styles and markup. Let's see... > > :-) >
PS. No need to address the Gemfile issue, I've made it work: http://fierce-leaf-919.heroku.com/ The articles are nowhere to be seen though... /James On Sun, Feb 6, 2011 at 3:47 PM, James Abbott <abbottjam@gmail.com> wrote: > Hi Graham,- > > trying to push the CMS to Heroku here, and a couple of questions arose. > Firstly, creating a test page as you outlined in the guide ( > http://effectif.com/nesta/deployment/heroku) does create the page > (accessible through http://localhost:9393/test), but the index page ( > http://localhost:9393/) doesn't show the new page in the list. Maybe I > just didn't format it properly. Here's what it looks like: > > # Test page! >> >> Test page created with cat. >> >> Goodbye. >> > Another thing: running "rake heroku:config" resulted in this message: > > .../.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.10/lib/bundler/shared_helpers.rb:107:in >> `block in cripple_rubygems': heroku is not part of the bundle. Add it to >> Gemfile. (Gem::LoadError) >> > > So I figured this must be a case of me having to add gem "heroku", > "1.17.10" to the Gemfile and throwing away the Gemfile.lock, correct? (I > have bundler, rvm, Ruby 1.9.2, and Rails 3.0.3 installed). > > And a final thing: is Disqus the only way to comment on articles? > > Cheers, > James > > > > On Sat, Feb 5, 2011 at 1:35 PM, Graham Ashton <graham@effectif.com> wrote: > >> On 5 Feb 2011, at 12:02, James Abbott wrote: >> >> > ... authoring, publishing, and editing content. It's a clever thought to >> delegate this task to an external editor >> >> Cheers (though I think the main reason there isn't a UI is just that >> nobody has made one). >> >> > Great that you can mix plain text and html tags. I wrote some text and >> then embedded a code snip inside pre and code tags; it worked. Again, a >> major productivity boost. >> >> If you're in markdown you can also do pre tags by indenting a paragraph by >> 4 spaces. >> >> It's also quite useful to be able to do markdown in Haml; handy if you >> want to use HTML5 tags but don't want to put all the p tags in by hand. >> >> %section >> %heading >> %h1 Page heading >> :markdown >> Normal markdown goes here... >> >> > I've noticed that on the demo page, the URL structure is home/bananas >> and not home/fruit/bananas, although /fruit is a category. Is that because >> the files are all under the same folder? >> >> Yes; the URLs are determined by which folders the files are in. It means >> you're free to choose which categories a page belongs to, without having to >> put it in a specific location. >> >> The demo files created by the sample_content rake task will probably get >> replaced by this (which has some better examples in it): >> >> https://github.com/gma/nesta-demo-content >> >> I made that to work with the gem, but it might run fine if you're using >> the master branch. >> >> > I assume that if I want to feature several articles, that would become: >> > >> > %section.featured >> > = article_summaries([Nesta::Page.find_by_path('/foo')]) >> > = article_summaries([Nesta::Page.find_by_path('/bar')]) >> > = article_summaries([Nesta::Page.find_by_path('/baz')]) >> > %section.articles >> > = article_summaries(latest_articles) >> >> Nearly. I'd probably add a featured articles helper to local/app.rb, like >> this: >> >> def featured_articles >> %w[/foo /bar /baz].map { |path| Nesta::Page.find_by_path(path) } >> end >> >> And then you can just put this in the template: >> >> %section.featured >> = article_summaries(featured_articles) >> %section.articles >> = article_summaries(latest_articles) >> >> It'd be nicer still to store the information about which articles are >> featured to each article's metadata. If you use the gem you'll find that >> each page object has a public metadata method, so you can poke around in the >> page metadata yourself. >> >> If your page started with: >> >> Featured: true >> >> You could access 'true' (it would be a string) by referencing >> page_object.metadata('featured'). >> >> Boolean settings on pages come up every now and again. Perhaps I should >> add support for them with one metadata key. Something like this: >> >> Flags: featured >> >> > http://24ways.org/2010/intro-to-css-3d-transforms). >> >> I agree that the year is quite useful; it's far better than what I used to >> do: >> >> http://effectif.com/articles/deploying-sinatra-with-vlad >> >> > PS. I've become rather enamored with the idea of authoring a theme for >> Nesta - already have some styles and markup. Let's see... >> >> :-) >> > >
Check your content folder settings in the 'production' part of the config file. I believe it should be a relative path from the project root, so 'content' by default. --- Wynn Netherland web: http://wynn.fm twitter / skype / facebook: pengwynn linkedin: http://linkedin.com/in/netherland On Mon, Feb 7, 2011 at 1:07 AM, James Abbott <abbottjam@gmail.com> wrote: > PS. No need to address the Gemfile issue, I've made it work: > > http://fierce-leaf-919.heroku.com/ > > The articles are nowhere to be seen though... > > /James > > On Sun, Feb 6, 2011 at 3:47 PM, James Abbott <abbottjam@gmail.com> wrote: >> >> Hi Graham,- >> >> trying to push the CMS to Heroku here, and a couple of questions arose. >> Firstly, creating a test page as you outlined in the guide >> (http://effectif.com/nesta/deployment/heroku) does create the page >> (accessible through http://localhost:9393/test), but the index page >> (http://localhost:9393/) doesn't show the new page in the list. Maybe I just >> didn't format it properly. Here's what it looks like: >> >>> # Test page! >>> >>> Test page created with cat. >>> >>> Goodbye. >> >> Another thing: running "rake heroku:config" resulted in this message: >> >>> >>> .../.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.10/lib/bundler/shared_helpers.rb:107:in >>> `block in cripple_rubygems': heroku is not part of the bundle. Add it to >>> Gemfile. (Gem::LoadError) >> >> So I figured this must be a case of me having to add gem "heroku", >> "1.17.10" to the Gemfile and throwing away the Gemfile.lock, correct? (I >> have bundler, rvm, Ruby 1.9.2, and Rails 3.0.3 installed). >> >> And a final thing: is Disqus the only way to comment on articles? >> >> Cheers, >> James >> >> >> On Sat, Feb 5, 2011 at 1:35 PM, Graham Ashton <graham@effectif.com> wrote: >>> >>> On 5 Feb 2011, at 12:02, James Abbott wrote: >>> >>> > ... authoring, publishing, and editing content. It's a clever thought >>> > to delegate this task to an external editor >>> >>> Cheers (though I think the main reason there isn't a UI is just that >>> nobody has made one). >>> >>> > Great that you can mix plain text and html tags. I wrote some text and >>> > then embedded a code snip inside pre and code tags; it worked. Again, a >>> > major productivity boost. >>> >>> If you're in markdown you can also do pre tags by indenting a paragraph >>> by 4 spaces. >>> >>> It's also quite useful to be able to do markdown in Haml; handy if you >>> want to use HTML5 tags but don't want to put all the p tags in by hand. >>> >>> %section >>> %heading >>> %h1 Page heading >>> :markdown >>> Normal markdown goes here... >>> >>> > I've noticed that on the demo page, the URL structure is home/bananas >>> > and not home/fruit/bananas, although /fruit is a category. Is that because >>> > the files are all under the same folder? >>> >>> Yes; the URLs are determined by which folders the files are in. It means >>> you're free to choose which categories a page belongs to, without having to >>> put it in a specific location. >>> >>> The demo files created by the sample_content rake task will probably get >>> replaced by this (which has some better examples in it): >>> >>> https://github.com/gma/nesta-demo-content >>> >>> I made that to work with the gem, but it might run fine if you're using >>> the master branch. >>> >>> > I assume that if I want to feature several articles, that would become: >>> > >>> > %section.featured >>> > = article_summaries([Nesta::Page.find_by_path('/foo')]) >>> > = article_summaries([Nesta::Page.find_by_path('/bar')]) >>> > = article_summaries([Nesta::Page.find_by_path('/baz')]) >>> > %section.articles >>> > = article_summaries(latest_articles) >>> >>> Nearly. I'd probably add a featured articles helper to local/app.rb, like >>> this: >>> >>> def featured_articles >>> %w[/foo /bar /baz].map { |path| Nesta::Page.find_by_path(path) } >>> end >>> >>> And then you can just put this in the template: >>> >>> %section.featured >>> = article_summaries(featured_articles) >>> %section.articles >>> = article_summaries(latest_articles) >>> >>> It'd be nicer still to store the information about which articles are >>> featured to each article's metadata. If you use the gem you'll find that >>> each page object has a public metadata method, so you can poke around in the >>> page metadata yourself. >>> >>> If your page started with: >>> >>> Featured: true >>> >>> You could access 'true' (it would be a string) by referencing >>> page_object.metadata('featured'). >>> >>> Boolean settings on pages come up every now and again. Perhaps I should >>> add support for them with one metadata key. Something like this: >>> >>> Flags: featured >>> >>> > http://24ways.org/2010/intro-to-css-3d-transforms). >>> >>> I agree that the year is quite useful; it's far better than what I used >>> to do: >>> >>> http://effectif.com/articles/deploying-sinatra-with-vlad >>> >>> > PS. I've become rather enamored with the idea of authoring a theme for >>> > Nesta - already have some styles and markup. Let's see... >>> >>> :-) >> > >
Hi Wynn,- Just wanted to make sure I understood you correctly. config.yml was: production: cache: false content: /var/apps/nesta/shared/content Now is changed to: production: cache: false content: content Then: git add . git commit -m "set path to content folder to relative" git push heroku heroku restart If I did everything correctly, it doesn't seem to do any difference: http://fierce-leaf-919.heroku.com/ Cheers, James On Mon, Feb 7, 2011 at 3:03 PM, Wynn Netherland <wynn.netherland@gmail.com>wrote: > Check your content folder settings in the 'production' part of the > config file. I believe it should be a relative path from the project > root, so 'content' by default. > > --- > Wynn Netherland > web: http://wynn.fm > twitter / skype / facebook: pengwynn > linkedin: http://linkedin.com/in/netherland > > On Mon, Feb 7, 2011 at 1:07 AM, James Abbott <abbottjam@gmail.com> wrote: > > PS. No need to address the Gemfile issue, I've made it work: > > > > http://fierce-leaf-919.heroku.com/ > > > > The articles are nowhere to be seen though... > > > > /James > > > > On Sun, Feb 6, 2011 at 3:47 PM, James Abbott <abbottjam@gmail.com> > wrote: > >> > >> Hi Graham,- > >> > >> trying to push the CMS to Heroku here, and a couple of questions arose. > >> Firstly, creating a test page as you outlined in the guide > >> (http://effectif.com/nesta/deployment/heroku) does create the page > >> (accessible through http://localhost:9393/test), but the index page > >> (http://localhost:9393/) doesn't show the new page in the list. Maybe I > just > >> didn't format it properly. Here's what it looks like: > >> > >>> # Test page! > >>> > >>> Test page created with cat. > >>> > >>> Goodbye. > >> > >> Another thing: running "rake heroku:config" resulted in this message: > >> > >>> > >>> > .../.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.10/lib/bundler/shared_helpers.rb:107:in > >>> `block in cripple_rubygems': heroku is not part of the bundle. Add it > to > >>> Gemfile. (Gem::LoadError) > >> > >> So I figured this must be a case of me having to add gem "heroku", > >> "1.17.10" to the Gemfile and throwing away the Gemfile.lock, correct? (I > >> have bundler, rvm, Ruby 1.9.2, and Rails 3.0.3 installed). > >> > >> And a final thing: is Disqus the only way to comment on articles? > >> > >> Cheers, > >> James > >> > >> > >> On Sat, Feb 5, 2011 at 1:35 PM, Graham Ashton <graham@effectif.com> > wrote: > >>> > >>> On 5 Feb 2011, at 12:02, James Abbott wrote: > >>> > >>> > ... authoring, publishing, and editing content. It's a clever thought > >>> > to delegate this task to an external editor > >>> > >>> Cheers (though I think the main reason there isn't a UI is just that > >>> nobody has made one). > >>> > >>> > Great that you can mix plain text and html tags. I wrote some text > and > >>> > then embedded a code snip inside pre and code tags; it worked. Again, > a > >>> > major productivity boost. > >>> > >>> If you're in markdown you can also do pre tags by indenting a paragraph > >>> by 4 spaces. > >>> > >>> It's also quite useful to be able to do markdown in Haml; handy if you > >>> want to use HTML5 tags but don't want to put all the p tags in by hand. > >>> > >>> %section > >>> %heading > >>> %h1 Page heading > >>> :markdown > >>> Normal markdown goes here... > >>> > >>> > I've noticed that on the demo page, the URL structure is home/bananas > >>> > and not home/fruit/bananas, although /fruit is a category. Is that > because > >>> > the files are all under the same folder? > >>> > >>> Yes; the URLs are determined by which folders the files are in. It > means > >>> you're free to choose which categories a page belongs to, without > having to > >>> put it in a specific location. > >>> > >>> The demo files created by the sample_content rake task will probably > get > >>> replaced by this (which has some better examples in it): > >>> > >>> https://github.com/gma/nesta-demo-content > >>> > >>> I made that to work with the gem, but it might run fine if you're using > >>> the master branch. > >>> > >>> > I assume that if I want to feature several articles, that would > become: > >>> > > >>> > %section.featured > >>> > = article_summaries([Nesta::Page.find_by_path('/foo')]) > >>> > = article_summaries([Nesta::Page.find_by_path('/bar')]) > >>> > = article_summaries([Nesta::Page.find_by_path('/baz')]) > >>> > %section.articles > >>> > = article_summaries(latest_articles) > >>> > >>> Nearly. I'd probably add a featured articles helper to local/app.rb, > like > >>> this: > >>> > >>> def featured_articles > >>> %w[/foo /bar /baz].map { |path| Nesta::Page.find_by_path(path) } > >>> end > >>> > >>> And then you can just put this in the template: > >>> > >>> %section.featured > >>> = article_summaries(featured_articles) > >>> %section.articles > >>> = article_summaries(latest_articles) > >>> > >>> It'd be nicer still to store the information about which articles are > >>> featured to each article's metadata. If you use the gem you'll find > that > >>> each page object has a public metadata method, so you can poke around > in the > >>> page metadata yourself. > >>> > >>> If your page started with: > >>> > >>> Featured: true > >>> > >>> You could access 'true' (it would be a string) by referencing > >>> page_object.metadata('featured'). > >>> > >>> Boolean settings on pages come up every now and again. Perhaps I should > >>> add support for them with one metadata key. Something like this: > >>> > >>> Flags: featured > >>> > >>> > http://24ways.org/2010/intro-to-css-3d-transforms). > >>> > >>> I agree that the year is quite useful; it's far better than what I used > >>> to do: > >>> > >>> http://effectif.com/articles/deploying-sinatra-with-vlad > >>> > >>> > PS. I've become rather enamored with the idea of authoring a theme > for > >>> > Nesta - already have some styles and markup. Let's see... > >>> > >>> :-) > >> > > > > >
On 9 Feb 2011, at 19:07, James Abbott <abbottjam@gmail.com> wrote: > > Just wanted to make sure I understood you correctly. config.yml was: > > Now is changed to: > > production: > cache: false > content: content > > Then: > > git add . > git commit -m "set path to content folder to relative" > git push heroku > heroku restart It looks like you're using the master branch and not the gem, in which case the instructions you followed when you first deployed to heroku will have said you should run the heroku:config rake task. All that rake task does is to set an environment variable (on heroku) for each setting in your config.yml file. It means that you need to re-run it if you change config.yml; there's no need to push your new config.yml file, but I think a restart might be required (I forget). People who have already moved to the gem won't have to worry about this, as the rake task has gone and heroku will just read config.yml directly. Nesta will ignore config.yml if it detects that any Nesta related env variables are set. You can inspect env bars on heroku with `heroku config` (or something very similar to that). Apologies for tardy replies, I'm 1500m up a mountain…
Spot on. I ran rake heroku:cofig and the entries are showing now (running that command also restarted the app, btw): http://fierce-leaf-919.heroku.com/ The only thing that puzzles me is that the test entry I created does not show on the main page, although it does seem to have been created without errors: http://fierce-leaf-919.heroku.com/test Apologies for tardy replies, I'm 1500m up a mountain… > Never and nowhere offline, eh? Anyway, enjoy your holiday; I'd gladly wait a week for a reply. / James On Thu, Feb 10, 2011 at 8:18 AM, Graham Ashton <graham@effectif.com> wrote: > On 9 Feb 2011, at 19:07, James Abbott <abbottjam@gmail.com> wrote: > > > > Just wanted to make sure I understood you correctly. config.yml was: > > > > Now is changed to: > > > > production: > > cache: false > > content: content > > > > Then: > > > > git add . > > git commit -m "set path to content folder to relative" > > git push heroku > > heroku restart > > It looks like you're using the master branch and not the gem, in which case > the instructions you followed when you first deployed to heroku will have > said you should run the heroku:config rake task. All that rake task does is > to set an environment variable (on heroku) for each setting in your > config.yml file. > > It means that you need to re-run it if you change config.yml; there's no > need to push your new config.yml file, but I think a restart might be > required (I forget). > > People who have already moved to the gem won't have to worry about this, as > the rake task has gone and heroku will just read config.yml directly. Nesta > will ignore config.yml if it detects that any Nesta related env variables > are set. You can inspect env bars on heroku with `heroku config` (or > something very similar to that). > > Apologies for tardy replies, I'm 1500m up a mountain…
On 10 Feb 2011, at 10:32, James Abbott wrote:
> The only thing that puzzles me is that the test entry I created does not
show on the main page
Only pages with dates are automatically included on the home page, so if
you add 'Date: 10 Feb 2011' to the top of the file it should show up.
If you switch to the gem you'll be able to edit the main page (it'll be in
content/pages/index.haml after you create a new project with the nesta
command). It's the way forward. You can browse the docs here, though I'm
still working on getting the site itself laid out properly:
https://github.com/gma/nestacms.com/tree/master/content/pages/docs
I should have read the docs closer: > There’s really nothing special about a blog post. They’re just web pages > that are published on a certain date. > So the only difference between a blog post and a static page is a publishing date. And URLs follow directory structures. That's so simple and good that it actually takes time to get used to. I'll to switch to the gem as the next thing - sounds like the way to go! Cheers, James On Thu, Feb 10, 2011 at 6:54 PM, Graham Ashton <graham@effectif.com> wrote: > On 10 Feb 2011, at 10:32, James Abbott wrote: > > > The only thing that puzzles me is that the test entry I created does not > show on the main page > > Only pages with dates are automatically included on the home page, so if > you add 'Date: 10 Feb 2011' to the top of the file it should show up. > > If you switch to the gem you'll be able to edit the main page (it'll be in > content/pages/index.haml after you create a new project with the nesta > command). It's the way forward. You can browse the docs here, though I'm > still working on getting the site itself laid out properly: > > https://github.com/gma/nestacms.com/tree/master/content/pages/docs >
Thanks, I'll have a look at that. In the meanwhile, here's a screenshot of the Nesta theme I've been playing with: http://forrst.com/posts/A_screenshot_of_a_blog_theme_Im_working_on-4CN Cheers, James On Mon, Feb 7, 2011 at 3:03 PM, Wynn Netherland <wynn.netherland@gmail.com>wrote: > Check your content folder settings in the 'production' part of the > config file. I believe it should be a relative path from the project > root, so 'content' by default. > > --- > Wynn Netherland > web: http://wynn.fm > twitter / skype / facebook: pengwynn > linkedin: http://linkedin.com/in/netherland > > On Mon, Feb 7, 2011 at 1:07 AM, James Abbott <abbottjam@gmail.com> wrote: > > PS. No need to address the Gemfile issue, I've made it work: > > > > http://fierce-leaf-919.heroku.com/ > > > > The articles are nowhere to be seen though... > > > > /James > > > > On Sun, Feb 6, 2011 at 3:47 PM, James Abbott <abbottjam@gmail.com> > wrote: > >> > >> Hi Graham,- > >> > >> trying to push the CMS to Heroku here, and a couple of questions arose. > >> Firstly, creating a test page as you outlined in the guide > >> (http://effectif.com/nesta/deployment/heroku) does create the page > >> (accessible through http://localhost:9393/test), but the index page > >> (http://localhost:9393/) doesn't show the new page in the list. Maybe I > just > >> didn't format it properly. Here's what it looks like: > >> > >>> # Test page! > >>> > >>> Test page created with cat. > >>> > >>> Goodbye. > >> > >> Another thing: running "rake heroku:config" resulted in this message: > >> > >>> > >>> > .../.rvm/gems/ruby-1.9.2-p0/gems/bundler-1.0.10/lib/bundler/shared_helpers.rb:107:in > >>> `block in cripple_rubygems': heroku is not part of the bundle. Add it > to > >>> Gemfile. (Gem::LoadError) > >> > >> So I figured this must be a case of me having to add gem "heroku", > >> "1.17.10" to the Gemfile and throwing away the Gemfile.lock, correct? (I > >> have bundler, rvm, Ruby 1.9.2, and Rails 3.0.3 installed). > >> > >> And a final thing: is Disqus the only way to comment on articles? > >> > >> Cheers, > >> James > >> > >> > >> On Sat, Feb 5, 2011 at 1:35 PM, Graham Ashton <graham@effectif.com> > wrote: > >>> > >>> On 5 Feb 2011, at 12:02, James Abbott wrote: > >>> > >>> > ... authoring, publishing, and editing content. It's a clever thought > >>> > to delegate this task to an external editor > >>> > >>> Cheers (though I think the main reason there isn't a UI is just that > >>> nobody has made one). > >>> > >>> > Great that you can mix plain text and html tags. I wrote some text > and > >>> > then embedded a code snip inside pre and code tags; it worked. Again, > a > >>> > major productivity boost. > >>> > >>> If you're in markdown you can also do pre tags by indenting a paragraph > >>> by 4 spaces. > >>> > >>> It's also quite useful to be able to do markdown in Haml; handy if you > >>> want to use HTML5 tags but don't want to put all the p tags in by hand. > >>> > >>> %section > >>> %heading > >>> %h1 Page heading > >>> :markdown > >>> Normal markdown goes here... > >>> > >>> > I've noticed that on the demo page, the URL structure is home/bananas > >>> > and not home/fruit/bananas, although /fruit is a category. Is that > because > >>> > the files are all under the same folder? > >>> > >>> Yes; the URLs are determined by which folders the files are in. It > means > >>> you're free to choose which categories a page belongs to, without > having to > >>> put it in a specific location. > >>> > >>> The demo files created by the sample_content rake task will probably > get > >>> replaced by this (which has some better examples in it): > >>> > >>> https://github.com/gma/nesta-demo-content > >>> > >>> I made that to work with the gem, but it might run fine if you're using > >>> the master branch. > >>> > >>> > I assume that if I want to feature several articles, that would > become: > >>> > > >>> > %section.featured > >>> > = article_summaries([Nesta::Page.find_by_path('/foo')]) > >>> > = article_summaries([Nesta::Page.find_by_path('/bar')]) > >>> > = article_summaries([Nesta::Page.find_by_path('/baz')]) > >>> > %section.articles > >>> > = article_summaries(latest_articles) > >>> > >>> Nearly. I'd probably add a featured articles helper to local/app.rb, > like > >>> this: > >>> > >>> def featured_articles > >>> %w[/foo /bar /baz].map { |path| Nesta::Page.find_by_path(path) } > >>> end > >>> > >>> And then you can just put this in the template: > >>> > >>> %section.featured > >>> = article_summaries(featured_articles) > >>> %section.articles > >>> = article_summaries(latest_articles) > >>> > >>> It'd be nicer still to store the information about which articles are > >>> featured to each article's metadata. If you use the gem you'll find > that > >>> each page object has a public metadata method, so you can poke around > in the > >>> page metadata yourself. > >>> > >>> If your page started with: > >>> > >>> Featured: true > >>> > >>> You could access 'true' (it would be a string) by referencing > >>> page_object.metadata('featured'). > >>> > >>> Boolean settings on pages come up every now and again. Perhaps I should > >>> add support for them with one metadata key. Something like this: > >>> > >>> Flags: featured > >>> > >>> > http://24ways.org/2010/intro-to-css-3d-transforms). > >>> > >>> I agree that the year is quite useful; it's far better than what I used > >>> to do: > >>> > >>> http://effectif.com/articles/deploying-sinatra-with-vlad > >>> > >>> > PS. I've become rather enamored with the idea of authoring a theme > for > >>> > Nesta - already have some styles and markup. Let's see... > >>> > >>> :-) > >> > > > > >