Exclude drafts from the latest widget
This commit is contained in:
		
							parent
							
								
									e72f8136ab
								
							
						
					
					
						commit
						6343452a62
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1,8 +1,8 @@
 | 
			
		|||
{{- $blogSection := site.GetPage "blog" -}}
 | 
			
		||||
{{- $latestBlogPosts := $blogSection.RegularPagesRecursive.ByDate.Reverse.Limit 2 -}}
 | 
			
		||||
{{- $latestBlogPosts := (where $blogSection.RegularPagesRecursive "Draft" "eq" false).ByDate.Reverse.Limit 2 -}}
 | 
			
		||||
 | 
			
		||||
{{- $photosSection := site.GetPage "photos" -}}
 | 
			
		||||
{{- $latestPhotoPosts := $photosSection.RegularPagesRecursive.ByDate.Reverse.Limit 4 -}}
 | 
			
		||||
{{- $latestPhotoPosts := (where $photosSection.RegularPagesRecursive "Draft" "eq" false).ByDate.Reverse.Limit 4 -}}
 | 
			
		||||
 | 
			
		||||
<div class="home-latest">
 | 
			
		||||
  {{ range $latestBlogPosts -}}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue