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

This commit is contained in:
ada
2025-08-22 16:57:35 +03:00
parent 895b596725
commit 69cca94f92
+6 -1
View File
@@ -8,7 +8,7 @@ permalink: /graph/
<script src="https://unpkg.com/force-graph"></script> <script src="https://unpkg.com/force-graph"></script>
<script> <script>
fetch('{{ "/graph.json" | relative_url }}') fetch('{{ "/assets/js/graph-data.json" | relative_url }}')
.then(r => r.json()) .then(r => r.json())
.then(data => { .then(data => {
const el = document.getElementById('graph'); const el = document.getElementById('graph');
@@ -27,3 +27,8 @@ permalink: /graph/
Graph.nodeRelSize(6); Graph.nodeRelSize(6);
}); });
</script> </script>
<style>
#note-graph { height: 70vh; min-height: 420px; }
</style>
<div id="note-graph"></div>