mirror of
				https://github.com/gohugoio/hugo.git
				synced 2024-05-11 05:54:58 +00:00 
			
		
		
		
	hugolib: Make sure that empty terms lists are still created
Fixes #2977
This commit is contained in:
		| @@ -351,6 +351,7 @@ func (h *HugoSites) createMissingPages() error { | ||||
| 							newPages = append(newPages, n) | ||||
| 						} | ||||
| 					} | ||||
| 				} | ||||
|  | ||||
| 				if s.isEnabled(KindTaxonomyTerm) { | ||||
| 					if !foundTaxonomyTermsPage { | ||||
| @@ -362,7 +363,6 @@ func (h *HugoSites) createMissingPages() error { | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 		} | ||||
|  | ||||
| 		if s.isEnabled(KindSection) { | ||||
| 			sectionPages := s.findPagesByKind(KindSection) | ||||
|   | ||||
| @@ -73,6 +73,7 @@ defaultContentLanguage = "en" | ||||
| tag = "tags" | ||||
| category = "categories" | ||||
| other = "others" | ||||
| empty = "empties" | ||||
| ` | ||||
|  | ||||
| 	pageTemplate := `--- | ||||
| @@ -141,4 +142,7 @@ others: | ||||
| 		require.Equal(t, "Hello Hugo World", helloWorld.Title) | ||||
| 	} | ||||
|  | ||||
| 	// Issue #2977 | ||||
| 	th.assertFileContent("public/empties/index.html", "Terms List", "Empties") | ||||
|  | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user