Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#37 2011-01-30 10:35:53

spiridon
Member
From: Mariupol, Ukraine
Registered: 2011-01-30
Posts: 43
Website

Re: smd_short_url: tiny/canonical URLs

Can be used rel="canonical" instead of rev="canonical"?
Or have I messed up something?

Offline

#38 2011-01-30 14:52:08

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 10,569
Website GitHub

Re: smd_short_url: tiny/canonical URLs

spiridon wrote:

Can be used rel="canonical" instead of rev="canonical"?

At the moment no. The plugin outputs rev because I thought that was how it was done (i.e. this document is also available at this, possibly shorter URL). rel means the opposite ; a forward link.

But since rev was (is? has been? I can’t keep up!) removed from the HTML 5 spec, then I guess I have no option but to add rel as an option to the plugin.

Let me think about how to offer it, and if anybody who knows more about this URL stuff can offer guidance in the meantime on how it should be done properly, please let me know. Thanks.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#39 2013-12-14 16:55:38

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,503
Website GitHub Twitter

Re: smd_short_url: tiny/canonical URLs

Hi Stef ;)

Maybe you could consider to add this schema attribute itemprop:

if ($type=="link") { $out = '<link rev="canonical" itemprop="url" href="'.$link.'" />'; }


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

Board footer

Powered by FluxBB