File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
src/compiler/contentModel2/collection Expand file tree Collapse file tree 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) => {
8383}
8484
8585const linkPosts = ( contentModel ) => {
86+ console . log ( 'linkPosts' )
8687 return {
8788 ...contentModel ,
8889 posts : contentModel . posts . map ( ( post ) => {
8990 const category = contentModel . categories . find ( cat => {
91+ console . log ( 'links find' , cat . path , post . category . path )
9092 return cat . path === post . category . path
9193 } )
9294 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) => {
3939}
4040
4141const getPostCategory = ( fsObject , categorized ) => {
42+ console . log ( 'getPostCategory fsObject.path' , fsObject . path )
4243 const pathParts = fsObject . path . split ( sep )
44+ console . log ( 'getPostCategory pathParts' , pathParts )
4345
4446 const categoryName = categorized ?
45- pathParts [ 1 ] :
47+ pathParts . slice ( - 2 , - 1 ) [ 0 ] :
4648 ( Dictionary . lookup ( 'defaultCategoryName' ) || 'Unclassified' )
4749
4850 const categoryPath = pathParts . slice ( 0 , - 1 ) . join ( sep )
51+ console . log ( 'getPostCategory categoryPath' , categoryPath )
4952
5053 const categoryPermalink = makePermalink ( {
5154 prefix : Settings . getSettings ( ) . permalinkPrefix ,
You can’t perform that action at this time.
0 commit comments