mirror of
https://github.com/Icinga/icinga-docs-tools.git
synced 2025-07-23 13:54:23 +02:00
Sort files found in projects docs directory by name
This commit is contained in:
parent
cfebfdfb10
commit
ea48dfa768
@ -40,7 +40,7 @@ config['projects'].each do |project_name, project_config|
|
||||
end
|
||||
|
||||
puts "Building page index from #{project_docs_dir}"
|
||||
Dir.glob("#{project_docs_dir}/*.md") do |file|
|
||||
Dir.glob("#{project_docs_dir}/*.md", File::FNM_CASEFOLD).sort.each do |file|
|
||||
filepath = file.gsub('projects/', '')
|
||||
filename = filepath.match(/(\d+)-(.*).md$/)
|
||||
header = filename[2].gsub('-', ' ').split.map(&:capitalize).join(' ')
|
||||
|
Loading…
x
Reference in New Issue
Block a user