Yii v2 snippet guide

Comparing #157 with #158

Revision #158 was created by rackycz rackycz on Oct 17, 2019, 3:07:26 PM.

seo

Content

[...]
<!-- Non-Essential, But Required for Analytics -->
<meta property="fb:app_id" content="your_app_id" />
<meta name="twitter:site" content="@website-username">

...
 
  
 
```
 
<!-- seotesteronline.com will also want you to add these: -->
 
  <meta name="description" content="blah blah">
 
  <meta property="og:type" content="website">
 
  <meta property="twitter:title" content="blah blah">
 
  <meta property="twitter:description" content="blah blah">
 
  <meta name="twitter:image" content="http://something.jpg">
 
```
 
 
Do not forget about file robots.txt and sitemap.xml:
 
 
```
 
// robots.txt can contain this:
 
User-agent: *
 
Allow: /
 
 
Sitemap: http://www.example.com/sitemap.xml
 
```
 
 
```
 
// And file sitemap.xml
 
<?xml version="1.0" encoding="UTF-8"?>
 
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"
 
        xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
 
  <url>
 
    <loc>http://example.com/someFile.html</loc>
 
    <image:image>
 
      <image:loc>http://example.com/someImg.jpg</image:loc>
 
    </image:image>
 
  </url> 
 
</urlset> 
 
```
 
 
You can also minify all your files and add "microdata". But I have never used it.