SEO and autoscroll packages for flow router

Hi all,

Currently in the process of switching from Iron Router to Flow Router but couldn’t find a couple of packages I relied quite heavily on. I spent yesterday having a stab at making them myself and have stuck them up on atmosphere. I haven’t shared a package before so just shout if I’ve done anything wrong!

Flow Router Autoscroll

This is pretty much a direct copy of OK Grow’s super helpful Iron Router Autoscroll package. It corrects the scroll position as you move through routes.

New route? We should be at the top of the page. Pressed the back button? We should return to the last scroll position on the previous page.

The only real difference is that it is for Flow Router rather than Iron Router. Full credit to OK Grow for this one!

meteor add tomwasd:flow-router-autoscroll

Github / Atmosphere

Flow Router SEO

This package is a bit more substantial. I’ve tried to create similar functionality to the MS-SEO package for Iron Router but have coded this from scratch.

It allows you to easily set title and meta tags for different routes within your app.

There’s the option to use a database to store title/meta information for static routes.

Open Graph and Twitter title, description and URL tags should be automatically generated.

meteor add tomwasd:flow-router-seo

Github / Atmosphere

Hopefully of some use to those using Flow Router or thinking about making the switch. Both packages are very early versions so please do use with some caution. If you spot a problem let me know here or on GitHub and I’ll try and get it sorted ASAP.

2 Likes

Thanks a lot, I will try those out asap :)!

Firstly, kudos for filling a gap (or two). :smile:

I have a concern with the flow-router-seo package, in that you have used an unprotected publication, which means I can hack the server-side collection through the browser console. May be worth adding in some allow/deny logic there!

Hi @robfallows,

Thanks for the comment/concern! I’m not sure this is something I’m immediately familiar with. Could you possibly give an example or point me towards something that would explain it in more detail?

I was under the impression if no allow/deny rules exist then the client is prohibited from writing to the collection at all.

Thanks,

Tom

You’re correct - my bad. Back to school for me :wink:

As long as insecure is removed, then all is well.

Phew, had me a little worried about some of the other stuff I’ve coded for a moment there! :wink: