mirror of
				https://github.com/explosion/spaCy.git
				synced 2025-10-31 07:57:35 +03:00 
			
		
		
		
	add canonical tag
This commit is contained in:
		
							parent
							
								
									6e6a8f5c07
								
							
						
					
					
						commit
						79ff34c213
					
				|  | @ -2,6 +2,7 @@ include ./header | |||
| include ./mixins.jade | ||||
| 
 | ||||
| - var Page = InitPage(Site, Authors.spacy, "home", '404') | ||||
| - Page.canonical_url = null | ||||
| - Page.is_error = true | ||||
| - Site.slogan = "404" | ||||
| - Page.active = {} | ||||
|  |  | |||
|  | @ -28,8 +28,10 @@ | |||
| -    Page.links = []; | ||||
| -    if (type == "home") { | ||||
| -       Page.url = ""; | ||||
| -       Page.canonical_url = Site.url + Page.url; | ||||
| -    } else { | ||||
| -       Page.url = "/" + type; | ||||
| -       Page.canonical_url = Site.url + Page.url.replace(/\/?$/, '/'); | ||||
| -    } | ||||
| - | ||||
| -    // Set defaults | ||||
|  | @ -57,6 +59,7 @@ | |||
| -    Page.description = Meta.description | ||||
| -    Page.date = Meta.date | ||||
| -    Page.url = Meta.url | ||||
| -    Page.canonical_url = Site.url + Page.url.replace(/\/?$/, '/'); | ||||
| -    Page.active["blog"] = true | ||||
| -    Page.links = Meta.links | ||||
| -    if (Meta.image != null) { | ||||
|  | @ -98,6 +101,8 @@ mixin WritePage(Site, Author, Page) | |||
|             meta(property="og:site_name" content=Site.name) | ||||
|             meta(property="article:published_time" content=getDate(Page.date).timestamp) | ||||
|             link(rel="stylesheet" href="/resources/css/style.css") | ||||
|             if Page.canonical_url | ||||
|                 link(rel="canonical" href=Page.canonical_url) | ||||
| 
 | ||||
|             //[if lt IE 9]><script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif] | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user