mirror of
https://github.com/Icinga/icinga-docs-tools.git
synced 2025-07-25 14:54:22 +02:00
Fix whitespaces
This commit is contained in:
parent
2340f1f2c5
commit
652bbdd878
@ -45,7 +45,7 @@ def cleanup_and_clone(clone_target, git, ref, inject_central_docs = false)
|
|||||||
puts "Checking out #{ref}"
|
puts "Checking out #{ref}"
|
||||||
%x(git --git-dir=#{clone_target}/.git --work-tree=#{clone_target} checkout #{ref} #{@git_options})
|
%x(git --git-dir=#{clone_target}/.git --work-tree=#{clone_target} checkout #{ref} #{@git_options})
|
||||||
|
|
||||||
if inject_central_docs
|
if inject_central_docs
|
||||||
puts "Inject Central Docs"
|
puts "Inject Central Docs"
|
||||||
%x(git config --global user.email "info@icinga.com")
|
%x(git config --global user.email "info@icinga.com")
|
||||||
%x(git config --global user.name "Icinga Docs Tool")
|
%x(git config --global user.name "Icinga Docs Tool")
|
||||||
@ -97,7 +97,7 @@ def build_page_index(full_docs_dir, project_docs_dir, package = "", product = ""
|
|||||||
subdirectory = []
|
subdirectory = []
|
||||||
nav_item = titleize(filename[2]) unless File.symlink?(filepath)
|
nav_item = titleize(filename[2]) unless File.symlink?(filepath)
|
||||||
is_template_dir = !filename[3].nil?
|
is_template_dir = !filename[3].nil?
|
||||||
|
|
||||||
Dir.glob("#{file}/*.md", File::FNM_CASEFOLD).sort.each do |subfile|
|
Dir.glob("#{file}/*.md", File::FNM_CASEFOLD).sort.each do |subfile|
|
||||||
subfile_path = subfile.gsub(full_docs_dir + '/', project_docs_dir + '/')
|
subfile_path = subfile.gsub(full_docs_dir + '/', project_docs_dir + '/')
|
||||||
# Get everything after last slash
|
# Get everything after last slash
|
||||||
@ -122,7 +122,7 @@ def build_page_index(full_docs_dir, project_docs_dir, package = "", product = ""
|
|||||||
|
|
||||||
subfile_path = subfile_path.gsub(subdir_name, new_subdir_name)
|
subfile_path = subfile_path.gsub(subdir_name, new_subdir_name)
|
||||||
end
|
end
|
||||||
|
|
||||||
header = titleize(subfile_name[1]) unless File.symlink?(subfile)
|
header = titleize(subfile_name[1]) unless File.symlink?(subfile)
|
||||||
subdirectory.push(header => subfile_path) if header
|
subdirectory.push(header => subfile_path) if header
|
||||||
end
|
end
|
||||||
@ -158,9 +158,9 @@ def build_page_index(full_docs_dir, project_docs_dir, package = "", product = ""
|
|||||||
subdirectory.unshift(filepath.gsub(/.md.d$/, '') + '/index.md')
|
subdirectory.unshift(filepath.gsub(/.md.d$/, '') + '/index.md')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
pages.push(nav_item => subdirectory) if nav_item
|
pages.push(nav_item => subdirectory) if nav_item
|
||||||
else
|
else
|
||||||
header = titleize(filename[2]) unless File.symlink?(filepath)
|
header = titleize(filename[2]) unless File.symlink?(filepath)
|
||||||
pages.push(header => filepath) if header
|
pages.push(header => filepath) if header
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user