Skip to content

Commit

Permalink
(core/wiki) Add visualization for tagged nodes in "Knowledge Network"…
Browse files Browse the repository at this point in the history
… page

* This commit adds the ability to visualize tagged nodes in the "Knowledge Network" page.
* By specifying tags in each document's front matter, users can now see
  tagged nodes in the network visualization. This feature was inspired by Quartz
  • Loading branch information
malkoG committed Oct 10, 2023
1 parent 5cd60de commit 5760994
Show file tree
Hide file tree
Showing 20 changed files with 267 additions and 49 deletions.
18 changes: 17 additions & 1 deletion plugins/builders/backlink_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ def build
wiki_documents = collect_wiki_resources(site)

nodes = Set.new
node_groups = Set.new
links = []
wiki_documents.each do |wiki_document|
pathname = wiki_document.relative_path.to_s
Expand All @@ -16,6 +17,18 @@ def build
nodes << source

wiki_content = wiki_document.content

tags = wiki_document.data.tags
tags.each do |tag|
group_name = "##{tag}"
node_groups << group_name
links << {
"source": group_name,
"target": source,
"value": 100,
}
end

internal_links = wiki_content.scan(/\[\[([\w\-\/\_\s\.]+)\]\]/)
internal_links&.each do |link|
link = link[0]
Expand All @@ -29,7 +42,10 @@ def build
end

reference_graph = {
"nodes": nodes.to_a.map { |name| ({ id: name, group: 1 }) },
"nodes": [
*nodes.to_a.map { |name| ({ id: name, group: 1 }) },
*node_groups.to_a.map { |name| ({ id: name, group: 2 }) }
],
"links": links,
}

Expand Down
125 changes: 125 additions & 0 deletions src/_data/wiki_datasets.json
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,44 @@
{
"id": "daily/2023-01-19",
"group": 1
},
{
"id": "#archive",
"group": 2
},
{
"id": "#productivity",
"group": 2
},
{
"id": "#vim",
"group": 2
},
{
"id": "#cli",
"group": 2
},
{
"id": "#project",
"group": 2
}
],
"links": [
{
"source": "#archive",
"target": "quarterly/2023-Q3",
"value": 100
},
{
"source": "#productivity",
"target": "workbench/cheatsheet",
"value": 100
},
{
"source": "#archive",
"target": "archive",
"value": 100
},
{
"source": "archive",
"target": "quarterly/2023-Q1",
Expand All @@ -165,11 +200,36 @@
"target": "quarterly/2023-Q3",
"value": 1
},
{
"source": "#archive",
"target": "quarterly/2023-Q2",
"value": 100
},
{
"source": "quarterly/2023-Q2",
"target": "appendix/excelcon-2nd",
"value": 1
},
{
"source": "#archive",
"target": "appendix/excelcon-2nd",
"value": 100
},
{
"source": "#productivity",
"target": "appendix/excelcon-2nd",
"value": 100
},
{
"source": "#vim",
"target": "appendix/excelcon-2nd",
"value": 100
},
{
"source": "#archive",
"target": "appendix",
"value": 100
},
{
"source": "appendix",
"target": "appendix/excelcon-2nd",
Expand All @@ -180,6 +240,11 @@
"target": "rfc/2616",
"value": 1
},
{
"source": "#archive",
"target": "quarterly/2023-Q1",
"value": 100
},
{
"source": "quarterly/2023-Q1",
"target": "projects/neural-bridge",
Expand All @@ -190,6 +255,11 @@
"target": "mastodon/recommendations",
"value": 1
},
{
"source": "#vim",
"target": "vim-plugin/flutter-tools.nvim",
"value": 100
},
{
"source": "vim-plugin/flutter-tools.nvim",
"target": "flutter",
Expand All @@ -210,6 +280,11 @@
"target": "vim-plugin/telekasten.nvim",
"value": 1
},
{
"source": "#productivity",
"target": "improving-productivity",
"value": 100
},
{
"source": "improving-productivity",
"target": "tmuxinator",
Expand All @@ -230,6 +305,16 @@
"target": "prompt-engineering",
"value": 1
},
{
"source": "#cli",
"target": "cli/diff",
"value": 100
},
{
"source": "#cli",
"target": "cli",
"value": 100
},
{
"source": "cli",
"target": "cli/diff",
Expand Down Expand Up @@ -260,6 +345,11 @@
"target": "neovim",
"value": 1
},
{
"source": "#productivity",
"target": "workbench",
"value": 100
},
{
"source": "workbench",
"target": "wezterm",
Expand All @@ -285,6 +375,21 @@
"target": "workbench/cheatsheet",
"value": 1
},
{
"source": "#cli",
"target": "wezterm",
"value": 100
},
{
"source": "#productivity",
"target": "wezterm",
"value": 100
},
{
"source": "#vim",
"target": "vim-plugin/telekasten.nvim",
"value": 100
},
{
"source": "vim-plugin/telekasten.nvim",
"target": "vim-plugin/telescope.nvim",
Expand Down Expand Up @@ -335,6 +440,26 @@
"target": "vim-plugin/mind.nvim",
"value": 1
},
{
"source": "#cli",
"target": "tmuxinator",
"value": 100
},
{
"source": "#productivity",
"target": "tmuxinator",
"value": 100
},
{
"source": "#cli",
"target": "neovim",
"value": 100
},
{
"source": "#project",
"target": "projects/neural-bridge",
"value": 100
},
{
"source": "projects/neural-bridge",
"target": "vim-plugin/telekasten.nvim",
Expand Down
1 change: 1 addition & 0 deletions src/_wiki/appendix.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: 부록
date: 2023-05-19
layout: wiki
tags: archive
---

이 문서의 하위 문서들은 외부 강연 혹은 스터디에서 참고자료로 활용했던 것들을 기록으로 남기기 위해 사용될 예정이다.
Expand Down
1 change: 1 addition & 0 deletions src/_wiki/appendix/excelcon-2nd.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: 제 2회 EXCELCON - Neovim으로 생산성 퀀텀점프하기
date: 2023-05-19
layout: wiki
tags: archive productivity vim
---

> Q&A는 취합해서 6월 중순 쯤에 업데이트해서 공유하겠습니다.
Expand Down
1 change: 1 addition & 0 deletions src/_wiki/archive.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Archive
date: 2023-06-17
layout: wiki
tags: archive
---

## 2023
Expand Down
1 change: 1 addition & 0 deletions src/_wiki/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: CLI
date: 2023-01-25
layout: wiki
tags: cli
---

이 문서에서는 주로 사용하는 CLI 도구를 다룰 것이고, 적당히 쓸만했던 CLI 명령어 조합을 나열하게 될 것이다.
Expand Down
1 change: 1 addition & 0 deletions src/_wiki/cli/diff.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: CLI/diff
date: 2023-01-25
layout: wiki
tags: cli
---

[diff](https://en.wikipedia.org/wiki/Diff) 명령어는 겉으로 보기에 비슷해보이는 두 개의 파일이 있을때, 어떤 부분이 다른지 파악하기 쉽게 해주는 유닉스 명령어이다. ~~운영체제 과제를 하면서 친해질 수 밖에 없는 친구이다~~
Expand Down
1 change: 1 addition & 0 deletions src/_wiki/improving-productivity.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: 생산성 개선
date: 2023-01-27
layout: wiki
tags: productivity
---

이 문서에서는 개인적으로 생산성 개선에 큰 도움이 되었던 도구들을 소개한다.
Expand Down
1 change: 1 addition & 0 deletions src/_wiki/neovim.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: neovim
date: 2023-01-20
layout: wiki
tags: cli
---

WIP
1 change: 1 addition & 0 deletions src/_wiki/projects/neural-bridge.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Neural Bridge
date: 2023-01-19
layout: wiki
tags: project
---

이름의 유래는 `neural network` + `bridgetown`.
Expand Down
1 change: 1 addition & 0 deletions src/_wiki/quarterly/2023-Q1.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: 2023 Q1 Review
date: 2023-03-29
layout: wiki
tags: archive
---

주기적으로 회고를 해야지하고 다짐만 하다가 2022년 회고도 못쓰고 월간 회고도 못쓰고 주간 회고는 어림도 없는 상황이 다가왔다.
Expand Down
1 change: 1 addition & 0 deletions src/_wiki/quarterly/2023-Q2.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: 2023 Q2 Review
date: 2023-06-09
layout: wiki
tags: archive
---

# Timeline
Expand Down
1 change: 1 addition & 0 deletions src/_wiki/quarterly/2023-Q3.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: 2023 Q3 Review
date: 2023-10-02
layout: wiki
tags: archive
---

번아웃이 심하게 오기도 했고, 지난 분기에 비해서는 이렇다할 큼지막한 이벤트도 별로 없다. 그나마 떠올릴 만한 것이라면, Rust 기반으로 CLI 도구를 만들기 시작했다는 것 정도겠고, 한 번 제대로 미쳐서 Vim 스티커를 600장 정도 주문제작해서 여기저기 뿌리고 다니고, 프롬프트 엔지니어링에 꽂혔다는 것 말고는 없을 것이다. 이번 분기는 비교적 지루하게 보냈다.
Expand Down
1 change: 1 addition & 0 deletions src/_wiki/tmuxinator.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: tmuxinator
date: 2023-01-20
layout: wiki
tags: cli productivity
---

터미널에서 벗어나지 못하게 해준 장본인 중 하나라고 볼 수 있을 정도로 쓸만하다.
Expand Down
1 change: 1 addition & 0 deletions src/_wiki/vim-plugin/flutter-tools.nvim.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: akinsho/flutter-tools.nvim
date: 2023-02-05
layout: wiki
tags: vim
---

> Build flutter and dart applications in neovim using the native LSP. It adds the ability to easily launch flutter applications, debug them, as well as extending/exposing LSP functionality such as the widget guides, an outline view of your widgets, and hot reloading.
Expand Down
1 change: 1 addition & 0 deletions src/_wiki/vim-plugin/telekasten.nvim.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: Telekasten.nvim
date: 2023-01-20
layout: wiki
tags: vim
---

~~Neovim에 강력한 검색 기능을 제공하는 킹갓제네럴엠퍼러~~ [[vim-plugin/telescope.nvim]] 기반으로 동작하는 zettelkasten management plugin
Expand Down
1 change: 1 addition & 0 deletions src/_wiki/wezterm.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: wezterm
date: 2023-01-20
layout: wiki
tags: cli productivity
---


Expand Down
1 change: 1 addition & 0 deletions src/_wiki/workbench.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: kodingwarrior's workbench
date: 2023-01-20
layout: wiki
tags: productivity
---

이 문서에서는 작업 환경을 어떻게 구성하고 있는지 기록할 것이다.
Expand Down
1 change: 1 addition & 0 deletions src/_wiki/workbench/cheatsheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
title: 오로지 키보드로만 모든 것을 해결하기 위한 Cheatsheet
date: 2023-09-18
layout: wiki
tags: productivity
---

사용하기 편한 단축키를 그 중 일부는 머슬메모리로서 체화할 필요가 있는 것들이다.
Expand Down
Loading

0 comments on commit 5760994

Please sign in to comment.