File tree 2 files changed +6
-1
lines changed
src/compiler/contentModel2/collection
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -83,10 +83,12 @@ const attachRelevantPosts = (post, posts) => {
83
83
}
84
84
85
85
const linkPosts = ( contentModel ) => {
86
+ console . log ( 'linkPosts' )
86
87
return {
87
88
...contentModel ,
88
89
posts : contentModel . posts . map ( ( post ) => {
89
90
const category = contentModel . categories . find ( cat => {
91
+ console . log ( 'links find' , cat . path , post . category . path )
90
92
return cat . path === post . category . path
91
93
} )
92
94
const postInCategory = category . posts . find ( p => p . path === post . path )
Original file line number Diff line number Diff line change @@ -39,13 +39,16 @@ const getTranscript = (metadata, localAssets) => {
39
39
}
40
40
41
41
const getPostCategory = ( fsObject , categorized ) => {
42
+ console . log ( 'getPostCategory fsObject.path' , fsObject . path )
42
43
const pathParts = fsObject . path . split ( sep )
44
+ console . log ( 'getPostCategory pathParts' , pathParts )
43
45
44
46
const categoryName = categorized ?
45
- pathParts [ 1 ] :
47
+ pathParts . slice ( - 2 , - 1 ) [ 0 ] :
46
48
( Dictionary . lookup ( 'defaultCategoryName' ) || 'Unclassified' )
47
49
48
50
const categoryPath = pathParts . slice ( 0 , - 1 ) . join ( sep )
51
+ console . log ( 'getPostCategory categoryPath' , categoryPath )
49
52
50
53
const categoryPermalink = makePermalink ( {
51
54
prefix : Settings . getSettings ( ) . permalinkPrefix ,
You can’t perform that action at this time.
0 commit comments