Module: Jekyll::VitePressTheme::LastUpdated
- Defined in:
- lib/jekyll/vitepress_theme/hooks.rb
Class Method Summary collapse
Class Method Details
.source_file_time(site, path) ⇒ Object
308 309 310 311 312 313 314 315 316 317 318 319 320 |
# File 'lib/jekyll/vitepress_theme/hooks.rb', line 308 def source_file_time(site, path) return nil unless path source_path = if Pathname.new(path).absolute? path else File.join(site.source, path) end return nil unless File.file?(source_path) File.mtime(source_path).utc end |