Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

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

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

Re: smd_short_url: tiny/canonical URLs

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


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

From: Leeds, UK
Registered: 2006-01-29
Posts: 11,293
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


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

Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,615
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.'" />'; }


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


Board footer

Powered by FluxBB