added command-line option --paginate_path
This commit is contained in:
		
							parent
							
								
									2b8017dfdc
								
							
						
					
					
						commit
						58d8fef7ec
					
				
							
								
								
									
										10
									
								
								bin/jekyll
								
								
								
								
							
							
						
						
									
										10
									
								
								bin/jekyll
								
								
								
								
							|  | @ -113,6 +113,16 @@ opts = OptionParser.new do |opts| | ||||||
|     end |     end | ||||||
|   end |   end | ||||||
| 
 | 
 | ||||||
|  |   opts.on("--paginate_path [PAGINATED_URL_FORMAT]", "Leave blank for /page<num>") do |paginate_path| | ||||||
|  |     begin | ||||||
|  |       options['paginate_path'] = paginate_path | ||||||
|  |       raise ArgumentError if options['paginate_path'].nil? | ||||||
|  |     rescue | ||||||
|  |       puts 'You must specify a pagination url format' | ||||||
|  |       exit 0 | ||||||
|  |     end | ||||||
|  |   end | ||||||
|  | 
 | ||||||
|   opts.on("--limit_posts [MAX_POSTS]", "Limit the number of posts to publish") do |limit_posts| |   opts.on("--limit_posts [MAX_POSTS]", "Limit the number of posts to publish") do |limit_posts| | ||||||
|     begin |     begin | ||||||
|       options['limit_posts'] = limit_posts.to_i |       options['limit_posts'] = limit_posts.to_i | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue