File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
src/compiler/contentModel/models Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -2,18 +2,20 @@ const Settings = require('../../../settings')
2
2
const contentTypes = require ( '../contentTypes' )
3
3
const parseTemplate = require ( '../parseTemplate' )
4
4
5
- const createHomepage = ( fsObject ) => {
5
+ const createHomepage = ( fsObject = { } ) => {
6
6
const permalink = Settings . getSettings ( ) . permalinkPrefix
7
7
8
8
const metadata = fsObject ?
9
9
parseTemplate ( fsObject , { permalink } ) :
10
10
{ attributes : { } }
11
11
12
+ const type = fsObject . extension === '.html' ? 'raw-index-html' : 'basic'
13
+
12
14
return {
13
15
...( fsObject || { } ) ,
14
16
type : contentTypes . HOMEPAGE ,
15
17
data : {
16
- type : metadata . type || 'basic' ,
18
+ type : metadata . type || type ,
17
19
title : metadata . title || '' ,
18
20
content : metadata . content || '' ,
19
21
mentions : metadata . mentions || [ ] ,
You can’t perform that action at this time.
0 commit comments