Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
malkoG committed Apr 19, 2024
1 parent bede446 commit af1f354
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,18 @@ end
# Add your own Rake tasks here! You can use `environment` as a prerequisite
# in order to write automations or other commands requiring a loaded site.
#
# task :my_task => :environment do
# puts site.root_dir
# automation do
# say_status :rake, "I'm a Rake tast =) #{site.config.url}"
# end
# end
task :my_task => :environment do
Dir.glob("src/_wiki/**/*.md").reject { _1.include?("templates") }.each do |path|
puts path
relative_path = path.split("/")[2..].join("/")
puts relative_path
image_path = relative_path.split('.').first + ".png"

target_path = "assets/wiki/#{image_path}"
puts target_path
end

automation do
say_status :rake, "I'm a Rake tast =) #{site.config.url}"
end
end

0 comments on commit af1f354

Please sign in to comment.