@@ -35,6 +35,7 @@ import (
3535var emptyPage = ""
3636
3737const (
38+ homePage = "---\n title: Home\n ---\n Home Page Content\n "
3839 simplePage = "---\n title: Simple\n ---\n Simple Page\n "
3940 invalidFrontMatterMissing = "This is a test"
4041 renderNoFrontmatter = "<!doctype><html><head></head><body>This is a test</body></html>"
@@ -595,12 +596,22 @@ func testAllMarkdownEnginesForPages(t *testing.T,
595596 writeSource (t , fs , filepath .Join (contentDir , fileSourcePairs [i ]), fileSourcePairs [i + 1 ])
596597 }
597598
599+ // Add a content page for the home page
600+ homePath := fmt .Sprintf ("_index.%s" , e .ext )
601+ writeSource (t , fs , filepath .Join (contentDir , homePath ), homePage )
602+
598603 s := buildSingleSite (t , deps.DepsCfg {Fs : fs , Cfg : cfg }, BuildCfg {SkipRender : true })
599604
600605 require .Len (t , s .RegularPages , len (pageSources ))
601606
602607 assertFunc (t , e .ext , s .RegularPages )
603608
609+ home , err := s .Info .Home ()
610+ require .NoError (t , err )
611+ require .NotNil (t , home )
612+ require .Equal (t , homePath , home .Path ())
613+ require .Contains (t , home .Content , "Home Page Content" )
614+
604615 }
605616
606617}
0 commit comments