Изменить путь сохранения графа: записывать данные в assets/js/graph-data.json вместо graph.json с использованием JSON.pretty_generate для улучшения читаемости.

This commit is contained in:
ada
2025-08-22 16:29:55 +03:00
parent 3cfaf6276c
commit 21420434e1
+3 -3
View File
@@ -98,9 +98,9 @@ module NoteGraph
end end
def write(dest) def write(dest)
dest_path = Jekyll.sanitized_path(dest, @dir, @name) out_path = site.in_dest_dir('assets/js/graph-data.json')
FileUtils.mkdir_p(File.dirname(dest_path)) FileUtils.mkdir_p(File.dirname(out_path))
File.write(dest_path, JSON.pretty_generate(@data)) File.write(out_path, json)
true true
end end
end end