No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.


How to use

Simply add the SeoWidget into your UiBinder. It currently supports all the following tags :

<!DOCTYPE ui:UiBinder SYSTEM "">
<ui:UiBinder xmlns:ui=""
            <seo:Title>My Title</seo:Title>
            <seo:Description>My Description</seo:Description>
                <seo:OgImage height="480" width="480">http://some.image.png</seo:OgImage>
                <seo:OgType typeValue="WEBSITE"/>
            <seo:Custom property="og:audio"></seo:Custom>
        <p>This is my page, now with SEO!</p>

If you want to use other meta properties, you can use <seo:Custom property="theproperty">Value</seo:Custom> as a fallback.

Internationalization (i18n)

You can also use ui:msg inside the tags to use i18n messages :

        <ui:msg description="SEO - MAIN - TITLE">Title</ui:msg>
        <ui:msg description="SEO - MAIN - DESCRIPTION">Description</ui:msg>
        <ui:msg description="SEO - MAIN - KEYWORDS">kw1,kw2,kw3</ui:msg>
        <seo:OgImage height="480" width="480">http://some.image.url</seo:OgImage>
        <seo:OgType typeValue="WEBSITE"/>

Although there are no specific og:title and og:description tags, they are copied at runtime from the seo:Title and ``seo:Description` tags.

How it works

When the SeoWidget is attached to the DOM, the content is used to generate <meta> tags. Those tags are then inserted into the <head> section. At the moment, nothing is done when the widget is detached. A good practice is to define specific SEO components in all your views.

Dynamic data

GWT-SEO can also simplify the way you handle meta properties from dynamic data

import com.arcbees.seo.Image;
import com.arcbees.seo.OpenGraph;
import com.arcbees.seo.SeoElements;
import com.arcbees.seo.TagsInjector;
// Other imports...
public class MyViewImpl implements MyView {
    interface Binder extends UiBinder<Widget, MyViewImpl> {}
    private final Widget widget;
    private final TagsInjector tagsInjector;
            Binder binder.
            TagsInjector tagsInjector) {
        widget = binder.createAndBindUi(this);
        this.tagsInjector = tagsInjector;
    public void setProduct(Product product) {
        Photo photo = product.getPhoto();
        Image image = new Image(photo.getUrl(), photo.getHeight(), photo.getWidth(), photo.getMimeType());
        OpenGraph openGraph = new OpenGraph.Builder()
        SeoElements seoElements = new SeoElements.Builder()
    // ...

##Thanks to