101 Cooking For Two - Everyday Recipes for Two: Making An Automatic Updating Recipe Index in Blogger

Tuesday, November 8, 2011

Making An Automatic Updating Recipe Index in Blogger


3/31/2013 Latest version at Blog Within A Blog

I try to be a good food blogger. It is just a hobby since I have a more than adequate day job. But I always try to be good at what I do.

Several months ago Dave at Inspired by eRecipe had a post on making your blog better with a separate page for a "Recipe Index". It seems all the "cool kids" are doing it. I blew it off since with over 200 recipes, it seemed impossible without days of work. It just didn't seem that important. But it bugged me... I want to be one of the cool kids but really it was just TOO MUCH WORK. Already to create a post, I edit photos, upload them, and create the basic post in Blogger. Then I enter it into Recipe Wiz to get a rich snippet. Paste the snippet into the post. Go to Google sites and create a printable version. Manually edit the snippet code to print correctly. Do a little formatting. Publish the post. Check it in the Rich Snippet Testing Tool. Then also post to FaceBook and eRecipe. That makes me a bit dizzy...

Well my mind just wonders sometimes (ADHD???) and it seemed to me that the data is all there in digital form. The Labels widget can get it, why can't I? Well I (and you) can. By using a feed of specific Labels, you can generate a linked list that you can publish on a static page but that will update with any additions to your site that contains a specific label.

Step By Step Instructions
1) You need to figure out how your feeds work. I use Feedburner from Google. The label specific feed for my BBQ label is
http://www.101cookingfortwo.com/feeds/posts/default/-/BBQ
 2) You now need to be able to create a JavaScripe of this feed. I used http://www.tanjabaumann.com/feed/build.php . There are others out there if you Google. Go to the site and follow the instructions.
Update note: Several times the feed for the code at the above site seemed slow so I have switched to http://feed2js.org but be sure to validate your feed at http://feedvalidator.org/ . If your feed errors here, just hit validate a second time and it will usually work. Then copy what is in the window as your corrected feed address which will have special charactors in it.

3) In a simple text editor (I used Wordpad), enter the title you want for that section and then paste the code you get under the title. Repeat for as many labels as you want listed. DO NOT do this in the Blogger editor - every time you save it, many characters are added to the code. Be sure to save your document from the word processor.

4) Now go to your blogger account and create a new page. I titled mine the creative name of "Recipe Index".

5) Now go back to your text editor and copy your newly created code. Go to the new page in blogger and in the HTML editor, paste your code. You can go to the "Compose" tab and add more text and change the formatting on your sections.

That is it. It will keep those labels updated when ever you publish. No manual labor. This is what I call great blogging.

I hope this helps some of you become a "cool kid" too.

Regard
DrDan

PS I would think this would work on Wordpress and other platforms but don't know.

Limitation: It appears that only about 25 posts will appear in any one feed. So I had to break up large categories into smaller labels. I split chicken into split breast, whole, drumsticks and skinless boneless etc.
This is now resolved. Read the comments below. Special thanks to Bong Mom.

Two updates for Oct 15 2012 
First, the you click the quote marks on the HTML edit page and insert all you HTML between the blockedit tags that are generated, all the stuff about blogger screwing with your code will disappear and you can edit within the blogger editor as long as you stay inside the tags.

Second, my issue with an apparent limit of 25 posts is now resolved. Special thanks to Bong Mom. See the comments below. It is a combination of a modification of the feed address and using a different RSS to Java converter. Doesn't work.... See update at Blog Within A Blog 

Updated

March 31 2013

DrDan

Labels: ,

13 Comments:

At November 9, 2011 at 12:39 PM , Blogger Rima said...

Hi DrDan, finally I found the solution! Thanks to you. Question though: what did you select on the Tanja baumann feed site to not have the label feed linked as well? See my "recipes" at www.bisousatoi.com and you will see that under every header I have a link again called "bisous a toi". Txs for your help!

 
At November 9, 2011 at 7:57 PM , Blogger Dr Dan said...

The setting I used were: exclude,0,0,no,no,y, unchecked and no CSS. When you do the preview, the name of your blog will appear above the feed but that is not included in the code. See my Recipe Index

 
At November 9, 2011 at 10:39 PM , Blogger Rima said...

Ah thanks! I saw the name in the feed preview and thought it was wrong - but ended up with it in my post. Thanks again!

 
At November 10, 2011 at 2:15 PM , Blogger Chris said...

I've been meaning to get around to doing that but haven't yet. I'm still hanging out with the non-cool kids, ha ha.

 
At December 2, 2011 at 5:56 AM , Blogger J.Richmore said...

Thank you for sharing this information, I really need this one.
catering nyc

 
At January 5, 2012 at 3:44 AM , Blogger Allen Bates said...

This will really help me a lot. Thank you very much.
long island weddings

 
At March 30, 2012 at 12:05 PM , Blogger El said...

Thank you! is there a way to make the posts in alphabetical order? thanks!

 
At March 30, 2012 at 7:37 PM , Blogger Dr Dan said...

Not that I know of...

 
At July 9, 2012 at 9:07 PM , Blogger Tip Garden said...

Ok, so I'm very much a novice and trying to learn all the possibilities. My blog in blogger is more than recipes. If I actually can wrap my brain around your idea can I do this for more than recipes? Say my crafts label, Thrifty label? I've always hated that when they click on the labels off to the side there isn't a pull down clickable menu of all the posts. Anyway, your instructions seem well written, I'm just clueless. Thanks!
Jan

 
At July 9, 2012 at 10:45 PM , Blogger Dr Dan said...

It can do it for any label. But I have not been able to have it do more the most resent 25 posts for any one label. For example I have 50 plus chicken posts, so I don't do "chicken" in the recipe index but I do "Chicken-Skinless Boneless" , "Chicken-Split Breasts" etc to keep the recipes in each label less than 25. Soon some of this divisions will be "full" and I will need another "trick" to keep the older posts for disappearing. I believe I will manually enter the older posts just behind the feeds.

 
At July 11, 2012 at 8:46 PM , Blogger Tip Garden said...

Thanks! I appreciate the help!

 
At October 15, 2012 at 3:20 PM , Blogger Bong Mom said...

You can increase the number this way

http://www.101cookingfortwo.com/feeds/posts/default/-/BBQ?max-results=100

 
At October 15, 2012 at 8:11 PM , Blogger Dr Dan said...

I had tried that before and it never worked BUT the problem appeared to be with the RSS to Java converters. This evening I found that your suggestion will work at http://www.rss-to-javascript.com/. I'll update the post. Thanks for the suggestion.

 

Post a Comment

Did you enjoy the post or have a question? Please leave a comment or ask away, provide info on how you liked something, etc. Note that spam, rude comments or comments with random links will all be deleted.

Subscribe to Post Comments [Atom]

<< Home