mirror of
				https://github.com/Wonderfall/hugo-WonderMod.git
				synced 2025-10-30 19:35:26 +01:00 
			
		
		
		
	Add robotsNoIndex parameter (#900)
- adds the ability to use the noindex and nofollow parameters for specific pages in production mode, preventing e.g. the imprint from showing up in search engines.
- Usage: In post front-matter add,
    ---
    robotsNoIndex: true
    ---
			
			
This commit is contained in:
		 Martin Pittermann
					Martin Pittermann
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							e59a43c00d
						
					
				
				
					commit
					7b9c836416
				
			| @@ -1,7 +1,7 @@ | |||||||
| <meta charset="utf-8"> | <meta charset="utf-8"> | ||||||
| <meta http-equiv="X-UA-Compatible" content="IE=edge"> | <meta http-equiv="X-UA-Compatible" content="IE=edge"> | ||||||
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | ||||||
| {{- if hugo.IsProduction | or (eq site.Params.env "production") }} | {{- if hugo.IsProduction | or (eq site.Params.env "production") | and (ne .Params.robotsNoIndex true) }} | ||||||
| <meta name="robots" content="index, follow"> | <meta name="robots" content="index, follow"> | ||||||
| {{- else }} | {{- else }} | ||||||
| <meta name="robots" content="noindex, nofollow"> | <meta name="robots" content="noindex, nofollow"> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user