Treat dotfiles as files without extension
If the file starts with a dot, the whole filename is considered the basename and there is not extension.
This commit is contained in:
		
							parent
							
								
									16c19ecd19
								
							
						
					
					
						commit
						e9cf7b4636
					
				| 
						 | 
				
			
			@ -70,8 +70,14 @@ module Jekyll
 | 
			
		|||
    #
 | 
			
		||||
    # Returns nothing
 | 
			
		||||
    def process(name)
 | 
			
		||||
      self.ext = File.extname(name)
 | 
			
		||||
      self.basename = name.split('.')[0..-2].first
 | 
			
		||||
      # Is it a dotfile ?
 | 
			
		||||
      if name[/^\./]
 | 
			
		||||
        self.ext = ''
 | 
			
		||||
        self.basename = name
 | 
			
		||||
      else
 | 
			
		||||
        self.ext = File.extname(name)
 | 
			
		||||
        self.basename = name.split('.')[0..-2].first
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    # Add any necessary layouts to this post
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue