add month_name and month_number
This commit is contained in:
		
							parent
							
								
									dd0f0e6e3c
								
							
						
					
					
						commit
						7c10a5e993
					
				@ -71,10 +71,10 @@
 | 
				
			|||||||
      ;
 | 
					      ;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    entities.forEach(function (f) {
 | 
					    entities.forEach(function (f) {
 | 
				
			||||||
      var set
 | 
					      var set;
 | 
				
			||||||
        , yindex = 3000 - f.year
 | 
					      var yindex = 3000 - f.year;
 | 
				
			||||||
        , mindex = 12 - f.month
 | 
					      var mindex = 12 - f.month;
 | 
				
			||||||
        ;
 | 
					      var monthName = months[parseInt(f.month, 10)];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      f.url = path.join(env.base_path, f.permalink);
 | 
					      f.url = path.join(env.base_path, f.permalink);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -84,10 +84,17 @@
 | 
				
			|||||||
      set = yearsArr[yindex];
 | 
					      set = yearsArr[yindex];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      if (!set.months[mindex]) {
 | 
					      if (!set.months[mindex]) {
 | 
				
			||||||
        set.months[mindex] = { month: months[parseInt(f.month, 10)], pages: [] };
 | 
					        set.months[mindex] = {
 | 
				
			||||||
 | 
					          month_name: monthName
 | 
				
			||||||
 | 
					        , month_number: mindex
 | 
				
			||||||
 | 
					        , month: monthName
 | 
				
			||||||
 | 
					        , pages: []
 | 
				
			||||||
 | 
					        };
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
      set = set.months[mindex];
 | 
					      set = set.months[mindex];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      f.month_name = months[parseInt(f.month, 10)];
 | 
				
			||||||
 | 
					      f.month_number = parseInt(f.month, 10);
 | 
				
			||||||
      set.pages.push(f);
 | 
					      set.pages.push(f);
 | 
				
			||||||
    });
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user