To get updates on new site content, like us on Facebook or follow us on Twitter.

Difference between revisions of "Template:Jfa-meta"

From JFA Wiki
(Parameters and Usage)
 
(48 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
{{#seo:
 
{{#seo:
| title = {{{title}}}
+
| title = {{{meta-title | {{FULLPAGENAME}} }}}
| keywords = {{{keywords}}}
+
| keywords = {{{meta-keywords | animal rights, veganism}}}
| description = {{{description}}}
+
| description = {{{meta-description | A page on the JFA Wiki}}}
| og:image = https://{{SERVERNAME}}/images/jfa-wiki-share-250.png
+
| image = {{{ meta-image | {{filepath:Jfa-default-og-share.png}} }}}
| og:site_name= The Justice for Animals (JFA) Wiki
+
| og:image = {{{ meta-image | {{filepath:Jfa-default-og-share.png}} }}}
 +
| site_name= The Justice for Animals (JFA) Wiki
 
| twitter:card = summary
 
| twitter:card = summary
 
| twitter:site = @jfanimals
 
| twitter:site = @jfanimals
| twitter:image:src = https://{{SERVERNAME}}/images/jfa-round-logo-jfa-wiki-facebook-share-200-200.png
 
 
}}
 
}}
  
 
<noinclude>
 
<noinclude>
 +
=== Purpose ===
  
=== Purpose ===
+
: Note: '''For the site to function properly, this template <span style="color:red"> must</span> be included in every page in the Main namespace except for tables.'''
 +
 
 +
: Note: '''In addition to documenting the template, this page provides the actual template, which you can't see unless you edit the page. '''
  
This template controls the meta tags used for search engine optimization (SEO). Perhaps, more importantly, it provides descriptive information for Facebook and Twitter when you share a page on one of those platforms.
+
This template provides meta information used in various places:
 +
* Page Listings
 +
** The ''meta-title''  and ''meta-description'' fields are used in page listing on this site via the Dynamic Page Listing (3) template.
 +
* Page Titles
 +
** The ''meta-title'' field is used to replace the title that is displayed at the top of the page. This replacement is done through javascript and only affects the ''display'' of the title. To avoid confusion, the meta-title here should not vary much from the ''real'' page title from which the URL is generated. But it can include punctuation not allowed in the ''real'' page title. Changing from the real title should be limited to:
 +
*** Periods at the end—if the title is a sentence.
 +
*** Spellout out words into contractions, but only where contractions sound more natural: ''cannot'' becomes ''can't.''
 +
* Search Engine Optimization (SEO)
 +
** The ''meta-title'', ''meta-keywords'', and ''meta-description'' fields are place in Meta Tags for SEO.
 +
* Facebook
 +
** The ''meta-title'' and ''meta-description" fields are used in Facebook sharing.
 +
* Twitter
 +
** The ''meta-title'' and ''meta-description'' (? not sure yet) fields are used in Facebook sharing.
  
 
=== Dependencies ===
 
=== Dependencies ===
Line 20: Line 35:
 
This template depends on the WikiSeo extension being installed and loaded.  
 
This template depends on the WikiSeo extension being installed and loaded.  
  
=== Parameters and Usage ===
+
=== Usage and Parameters ===
 +
 
 +
'''For the site to function properly, this template <span style="color:red"> must</span> be included in every page in the Main namespace, except for Tables.''' If you place a jfa-meta template in a table, and the table is included on another page, nothing on that page will display after the table.
  
Place the template toward the bottom of the page after the Meta heading, and after any text under the Meta,
+
Place the template toward the bottom of the page after the Meta heading,  
heading but before any category tags.
+
and after any text under the Meta, heading but before any category tags.
  
 
<pre>
 
<pre>
 
<nowiki>
 
<nowiki>
 
+
{{jfa-meta
{{jfa Meta
+
| meta-title = This is the title of the page
| title = This is the title of the page
+
| meta-keywords = keyword1, keyword2, keyword3
| keywords = keyword1, keyword2, keyword3
+
| meta-image = {{filepath:{{PAGENAME:File:your-file-name.png}}}} [note: a reasonable default is provided]
| description = A description of the page goes here, and   
+
| meta-description = A description of the page goes here, and   
 
can be wrapped to multiple lines. Take care to leave a space  
 
can be wrapped to multiple lines. Take care to leave a space  
 
at the end of each line. And also be sure and leave off
 
at the end of each line. And also be sure and leave off
Line 38: Line 55:
 
</nowiki>
 
</nowiki>
 
</pre>
 
</pre>
 
 
</noinclude>
 
</noinclude>

Latest revision as of 10:32, 24 October 2019


Purpose

Note: For the site to function properly, this template must be included in every page in the Main namespace except for tables.
Note: In addition to documenting the template, this page provides the actual template, which you can't see unless you edit the page.

This template provides meta information used in various places:

  • Page Listings
    • The meta-title and meta-description fields are used in page listing on this site via the Dynamic Page Listing (3) template.
  • Page Titles
    • The meta-title field is used to replace the title that is displayed at the top of the page. This replacement is done through javascript and only affects the display of the title. To avoid confusion, the meta-title here should not vary much from the real page title from which the URL is generated. But it can include punctuation not allowed in the real page title. Changing from the real title should be limited to:
      • Periods at the end—if the title is a sentence.
      • Spellout out words into contractions, but only where contractions sound more natural: cannot becomes can't.
  • Search Engine Optimization (SEO)
    • The meta-title, meta-keywords, and meta-description fields are place in Meta Tags for SEO.
  • Facebook
    • The meta-title and meta-description" fields are used in Facebook sharing.
  • Twitter
    • The meta-title and meta-description (? not sure yet) fields are used in Facebook sharing.

Dependencies

This template depends on the WikiSeo extension being installed and loaded.

Usage and Parameters

For the site to function properly, this template must be included in every page in the Main namespace, except for Tables. If you place a jfa-meta template in a table, and the table is included on another page, nothing on that page will display after the table.

Place the template toward the bottom of the page after the Meta heading, and after any text under the Meta, heading but before any category tags.


{{jfa-meta
| meta-title = This is the title of the page
| meta-keywords = keyword1, keyword2, keyword3
| meta-image = {{filepath:{{PAGENAME:File:your-file-name.png}}}} [note: a reasonable default is provided]
| meta-description = A description of the page goes here, and  
can be wrapped to multiple lines. Take care to leave a space 
at the end of each line. And also be sure and leave off
the vertical bars on second and subsequent lines.
}}