An interactive personal knowledge website with D3 tree visualization.
npm install
npm start
Visit http://localhost:3000
knowledge-website/
├── server/index.js # Express server
├── public/
│ ├── index.html # Main page
│ ├── css/ # Styles
│ └── js/ # D3 tree + content display
├── content/ # Markdown files
├── categories/
│ └── tree-structure.json # Tree hierarchy
└── scripts/
├── categorize.js # AI categorization
└── build-static.js # Static site builder
The categorization script uses Ollama to analyze new content:
# Start Ollama
ollama serve
ollama pull phi3
# Categorize a file
npm run categorize -- content/new-file.md
The script will:
content/:---
title: My Title
description: Brief description for the table view
date: 2024-01-15
collaborators: []
references: []
---
Content here...
categories/tree-structure.json:{
"name": "My Title",
"slug": "my-file-name",
"children": null
}
npm run categorize -- content/my-file.md
npm run build-static
npx serve dist
{
"name": "Display Name",
"slug": "content-file-name-or-null",
"children": [
{ "name": "Child", "slug": "child-slug", "children": null }
]
}
slug: Filename without .md (null for branch nodes)children: Array of child nodes (null for leaf nodes)