Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2015-06-23 00:26:15

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,193
Website

the keywords tag and in-content display

STR:
1. For any old (or new…) article, insert a few keywords, separated by a coma and optionally followed by a white-space (as in: foo, bar, baz)
2. In the appropriate article form, add a <txp:meta_keywords format="" /> (new syntax).
3. actual output: foo,bar,baz – note the lack of white-space after the comma.
4. expected output: foo, bar, baz

(Note that the issue isn’t new – it has always been there, afaik)

The lack of white-space is OK when used in the <head> as a meta tag. That is for robots. For in-content it is a bit sad, and damn unreadable (in most western languages anyway).

But thinking further, a French language user will expect a (unbreakable) white-space before the comma and one after the comma. The Japanese user on the other hand, won’t want any (additional) white-space before/after the comma, but would expect a Japanese comma () separating the keywords. Other languages have their own particularities.

I’m not sure what solution, if any, would be suitable to make that tag minimally more useful. At the most basic level, add a white-space after the comma would be a first step. An additional attribute (separator="") for other languages?


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#2 2015-06-23 07:49:27

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,448
Website GitHub

Re: the keywords tag and in-content display

phiw13 wrote #291841:

The lack of white-space is OK when used in the <head> as a meta tag. That is for robots. For in-content it is a bit sad, and damn unreadable

The Write panel is responsible for removing any newlines, tabs and spaces prior to storage. It reinstates the space for display purposes on the admin side, but you’re right, there should be a way to output the list in a more readable format on the public side.

I like the separator attribute. Would probably default it to empty so it preserves what we have now. But I’m willing to take views on whether to make the pretty version the default. After all, since keywords are no longer useful for <meta> tags, their only function is likely to be for visual display.


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

#3 2015-06-23 07:57:48

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,448
Website GitHub

Re: the keywords tag and in-content display

And done.


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

#4 2015-06-23 08:32:05

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,193
Website

Re: the keywords tag and in-content display

Bloke wrote #291849:

And done.

:-)

Also:

Bloke wrote #291848:

After all, since keywords are no longer useful for <meta> tags, their only function is likely to be for visual display.

Yeah, for general purpose search-engines that is truth. I’m not so sure about specialised ones, though.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#5 2015-06-23 09:04:45

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,448
Website GitHub

Re: the keywords tag and in-content display

phiw13 wrote #291852:

Yeah, for general purpose search-engines that is truth. I’m not so sure about specialised ones, though.

Oh, so some still pay attention to <meta name="keywords" />? I didn’t realise.


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

#6 2015-06-23 09:22:22

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,193
Website

Re: the keywords tag and in-content display

Bloke wrote #291855:

Oh, so some still pay attention to <meta name="keywords" />? I didn’t realise.

I don’t know for sure. A couple of months ago, a visitor talked to my co-editor (site is about linguistic and socio-cultural stuff), suggesting the addition of an in-content list of keywords for each article as scientists and their DB seem to like that. She seems to imply that they used in-house bots to search for articles. Those bots probably look at all kind of meta data.

(My co-editor added those using a custom field at the time, as it worked well for the authors workflow)


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#7 2015-06-23 15:48:38

Destry
Member
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,909
Website

Re: the keywords tag and in-content display

phiw13 wrote #291841:

…a French language user will expect a (unbreakable) white-space before the comma

That’s true in French for just about every punctuation mark except commas and periods; no space before those. Thank the Latin gods.

Offline

Board footer

Powered by FluxBB