You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jspwiki.apache.org by Ulf Dittmer <ul...@googlemail.com.INVALID> on 2019/07/09 10:03:55 UTC

Adding meta tags to page headers

If I wanted to add meta tags to the page header (specifically, description,
keywords and robots), would I have to write a plugin or a filter? With a
plugin I can pass the values of those headers along, but I don't think
plugins have access (or can add) tags to the HTML header...? With a
post-translate filter that would be possible, but it would be kind of messy
to have to work with the raw HTML in order to add tags. Am I missing some
other approach of controlling HTML headers?

Re: Adding meta tags to page headers

Posted by Juan Pablo Santos Rodríguez <ju...@gmail.com>.
Hi Ulf,

regarding JSPWIKI-1114 <https://issues.apache.org/jira/browse/JSPWIKI-1114>,
it should be enough with that :-) Lately I'm not having too much time in
front of my pc so I didn't had the chance
to do a proper review (surely the same for other committers), but it should
make for next release. A github PR may speed up things a
little, as that can be reviewed and merged fairly easily, but of course
that's not mandatory.

thanks for your interest in JSPWiki!


best regards,
juan pablo

On Wed, Jul 10, 2019 at 10:13 PM Dirk Frederickx <di...@gmail.com>
wrote:

> Ulf,
>
> Thanks for using JSPWiki,  and giving us good idea to improve it.
>
> Try installing 2.11.0-M5-git-06;  which has now support for the KEYWORDS
> meta tag.
> Just add [{SET keywords=tag1,tag2}]  to you page, and you will see the
> keywords in the INFO dropdown,  and also as meta tags in the rendered page.
>
>
> dirk
>

Re: Adding meta tags to page headers

Posted by Dirk Frederickx <di...@gmail.com>.
Ulf,

Thanks for using JSPWiki,  and giving us good idea to improve it.

Try installing 2.11.0-M5-git-06;  which has now support for the KEYWORDS
meta tag.
Just add [{SET keywords=tag1,tag2}]  to you page, and you will see the
keywords in the INFO dropdown,  and also as meta tags in the rendered page.


dirk

Re: Adding meta tags to page headers

Posted by Ulf Dittmer <ul...@googlemail.com.INVALID>.
> Adding support for "keywords" to a wiki-page would be a great addition
> for JSPWiki.
> See also JSPWIKI-1105 <https://issues.apache.org/jira/browse/JSPWIKI-1105>
> with
> the suggestions to add support for page-tags  (#keyword1, #keywordk2) .
>

That's  more involved than I can than tackle at this point, I'm afraid. But
if I do work on some improvement (like
https://issues.apache.org/jira/browse/JSPWIKI-1114), is creating a ticket
the best way to get it to someone's attention?



> A quick & easy solution for page-specific keywords, could be the following
> :
>
> Add this to commonheader.jsp =>
> <meta name="keywords" content='<wiki:Variable var="keywords" />' />
>
> In your specific page you insert the following markup:
> [{SET keywords='keyword1, keyword2, keyword2'}]
>

That would be sufficient for my purposes.

Thanks very much for all your help, that's terrific. I think I'll get a lot
of mileage out of JSPWiki, and can hopefully contribute a bit in return.

Ulf

Re: Adding meta tags to page headers

Posted by Dirk Frederickx <di...@gmail.com>.
Ulf,

Some meta tags are already generated by JSPWiki   (description, robots)

Adding support for "keywords" to a wiki-page would be a great addition for
JSPWiki.
See also JSPWIKI-1105 <https://issues.apache.org/jira/browse/JSPWIKI-1105> with
the suggestions to add support for page-tags  (#keyword1, #keywordk2) .


If you only want to add generic keywords for your JSPWiki site (so not per
page)  I'd suggest you change the commonheader.jsp   where all meta-tags
are rendered.


A quick & easy solution for page-specific keywords, could be the following :

Add this to commonheader.jsp =>
<meta name="keywords" content='<wiki:Variable var="keywords" />' />

In your specific page you insert the following markup:
[{SET keywords='keyword1, keyword2, keyword2'}]


BR,
    dirk




On Tue, Jul 9, 2019 at 12:03 PM Ulf Dittmer
<ul...@googlemail.com.invalid> wrote:

> If I wanted to add meta tags to the page header (specifically, description,
> keywords and robots), would I have to write a plugin or a filter? With a
> plugin I can pass the values of those headers along, but I don't think
> plugins have access (or can add) tags to the HTML header...? With a
> post-translate filter that would be possible, but it would be kind of messy
> to have to work with the raw HTML in order to add tags. Am I missing some
> other approach of controlling HTML headers?
>