Template:PageSeo: Difference between revisions

From bg3.wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#seo:
<includeonly>{{hidden code |
|title = {{{fulltitle|{{{title|{{PAGENAME}}}}} - {{SITENAME}}}}}
{{#seo:
|keywords = {{{fullkeywords|{{{keywords|{{PAGENAME}}}}}, {{SITENAME}}, baldur's gate 3, bg3, wiki}}}
| type = {{{type|article}}}
|description = {{{description}}}
| site_name = Baldur's Gate 3 Wiki
|image = {{{image|BG3Logo.webp}}}
| title = {{{fulltitle|{{{title|{{PAGENAME}}}}} - {{SITENAME}}}}}
| keywords = {{{fullkeywords|{{{keywords|{{PAGENAME}}}}}, Baldur's Gate 3 Wiki, BG3 Wiki, Baldur's Gate 3, BG3, Wiki, bg3.wiki}}}
| description = {{{description|Read about {{PAGENAME}} on bg3.wiki, the Baldur's Gate 3 Wiki curated by the community.}}}
| image = {{{image|}}}
}}
}}</includeonly><noinclude>
}}</includeonly><noinclude>
Use this template to optimize a page for SEO.  It uses the <code><nowiki>{{#seo:}}</nowiki></code> tag underneath, which is added by the WikiSEO plugin.
Use this template to optimize a page for SEO.  It uses the <code><nowiki>{{#seo:}}</nowiki></code> tag underneath, which is added by the WikiSEO extension.
 
Generally, it's a good idea to provide a '''description''' and an '''image''', which don't have good default values.  According to various web pages, an ideal description is apparently around 160 characters.  Search engines might display the description under the title of the page in the results, where they would otherwise use an auto-generated preview snippet based on page contents.  Note that Google completely ignores the keywords, according to [https://developers.google.com/search/blog/2009/09/google-does-not-use-keywords-meta-tag a blog article they published in 2009].


Example usage:
Example usage:
<pre>
<pre>
{{PageSeo
{{PageSeo
|title = An alternative title
| title = An alternative title
|keywords = blah, blub, blip
| keywords = blah, blub, blip
|description = A summary of what this wiki page is about
| description = A summary of what this wiki page is about
|image = Some_image.jpg
| image = Some_image.jpg
| type = article
}}
}}
</pre>
</pre>
Line 19: Line 26:
Default values:
Default values:


* {{c|title}}: <nowiki>{{PAGENAME}}</nowiki> - {{SITENAME}}
* {{code|title}}: <nowiki>{{PAGENAME}}</nowiki> - {{SITENAME}}
* {{c|keywords}}: <nowiki>{{PAGENAME}}</nowiki>, {{SITENAME}}, baldur's gate 3, bg3, wiki
* {{code|keywords}}: <nowiki>{{PAGENAME}}</nowiki>, Baldur's Gate 3 Wiki, BG3 Wiki, Baldur's Gate 3, BG3, Wiki, bg3.wiki
* {{code|type}}: article
 
If you provide {{code|title}}, it will automatically have {{code| - {{SITENAME}}}} appended to it.


If you provide the {{c|title}} parameter, it will automatically have {{c| - {{SITENAME}}}} appended to it.
If you provide {{code|keywords}}, it will automatically have {{code|, Baldur's Gate 3 Wiki, BG3 Wiki, Baldur's Gate 3, BG3, Wiki, bg3.wiki}} appended to it.


If you provide the {{c|keywords}} parameter, it will automatically have {{c|, {{SITENAME}}, baldur's gate 3, bg3, wiki}} appended to it.
If you would like to control the full title or keywords tag contents without those automatic additions, you can instead use {{code|fulltitle}} and {{code|fullkeywords}}.


If you would like to control the full title or keywords tag contents, you can use {{c|fulltitle}} and {{c|fullkeywords}} instead.
But as mentioned above, usually you should only provide a '''description''' and an '''image''' like this:
<pre>
{{PageSeo
| description =
| image =
}}
</pre>
</noinclude>
</noinclude>

Latest revision as of 01:35, 7 June 2024

Use this template to optimize a page for SEO. It uses the {{#seo:}} tag underneath, which is added by the WikiSEO extension.

Generally, it's a good idea to provide a description and an image, which don't have good default values. According to various web pages, an ideal description is apparently around 160 characters. Search engines might display the description under the title of the page in the results, where they would otherwise use an auto-generated preview snippet based on page contents. Note that Google completely ignores the keywords, according to a blog article they published in 2009.

Example usage:

{{PageSeo
| title = An alternative title
| keywords = blah, blub, blip
| description = A summary of what this wiki page is about
| image = Some_image.jpg
| type = article
}}

Default values:

  • title: {{PAGENAME}} - bg3.wiki
  • keywords: {{PAGENAME}}, Baldur's Gate 3 Wiki, BG3 Wiki, Baldur's Gate 3, BG3, Wiki, bg3.wiki
  • type: article

If you provide title, it will automatically have - bg3.wiki appended to it.

If you provide keywords, it will automatically have , Baldur's Gate 3 Wiki, BG3 Wiki, Baldur's Gate 3, BG3, Wiki, bg3.wiki appended to it.

If you would like to control the full title or keywords tag contents without those automatic additions, you can instead use fulltitle and fullkeywords.

But as mentioned above, usually you should only provide a description and an image like this:

{{PageSeo
| description =
| image =
}}