Skip to content

Commit c1286a9

Browse files
author
Dylan Storey
committed
Add documentation site and HotpotQA GraphRAG example
- Add mdBook documentation site following Diátaxis framework - Tutorials: Getting started, knowledge graphs, graph analytics - How-to guides: Installation, algorithms, parameterized queries - Reference: Cypher clauses/functions, Python/Rust API, algorithms - Explanation: Architecture, storage model, performance - Condense README to essentials, link to full docs - Replace nanographrag with llm-graphrag example - HotpotQA multi-hop reasoning dataset - Graph-based retrieval with sqlite-vec - Ollama integration for local LLM inference - Fix API documentation to match actual bindings - Update .gitignore for example data files
1 parent 6f76ef6 commit c1286a9

File tree

146 files changed

+5558
-6368
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+5558
-6368
lines changed

.github/workflows/docs.yml

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches: [main]
6+
tags: ['v*']
7+
pull_request:
8+
branches: [main]
9+
paths: ['docs/**']
10+
11+
permissions:
12+
contents: read
13+
pages: write
14+
id-token: write
15+
16+
concurrency:
17+
group: "pages"
18+
cancel-in-progress: false
19+
20+
jobs:
21+
build:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
with:
26+
fetch-depth: 0
27+
28+
- name: Install mdBook
29+
run: |
30+
mkdir -p $HOME/.local/bin
31+
curl -sSL https://github.com/rust-lang/mdBook/releases/download/v0.4.40/mdbook-v0.4.40-x86_64-unknown-linux-gnu.tar.gz | tar -xz -C $HOME/.local/bin
32+
echo "$HOME/.local/bin" >> $GITHUB_PATH
33+
34+
- name: Get version info
35+
id: version
36+
run: |
37+
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
38+
VERSION="${GITHUB_REF#refs/tags/}"
39+
echo "version=$VERSION" >> $GITHUB_OUTPUT
40+
echo "is_main=false" >> $GITHUB_OUTPUT
41+
else
42+
echo "version=latest" >> $GITHUB_OUTPUT
43+
echo "is_main=true" >> $GITHUB_OUTPUT
44+
fi
45+
46+
- name: Build current docs
47+
working-directory: docs
48+
run: mdbook build
49+
50+
- name: Fetch existing docs (for versioning)
51+
if: github.event_name == 'push'
52+
run: |
53+
mkdir -p _site
54+
# Try to fetch existing gh-pages content
55+
git fetch origin gh-pages:gh-pages 2>/dev/null || true
56+
if git rev-parse --verify gh-pages >/dev/null 2>&1; then
57+
git worktree add _site gh-pages
58+
fi
59+
60+
- name: Organize versioned docs
61+
if: github.event_name == 'push'
62+
run: |
63+
VERSION="${{ steps.version.outputs.version }}"
64+
65+
# For main branch, always update /latest/
66+
# For tags, create versioned directory
67+
rm -rf _site/$VERSION
68+
mkdir -p _site/$VERSION
69+
cp -r docs/book/* _site/$VERSION/
70+
71+
# Generate versions.json (tagged versions + latest)
72+
cd _site
73+
{
74+
echo "["
75+
echo " \"latest\""
76+
for v in $(ls -d v* 2>/dev/null | sort -Vr | head -10); do
77+
echo " ,\"$v\""
78+
done
79+
echo "]"
80+
} > versions.json
81+
82+
# Create index redirect to latest
83+
cat > index.html << 'EOF'
84+
<!DOCTYPE html>
85+
<html>
86+
<head>
87+
<meta http-equiv="refresh" content="0; url=latest/">
88+
<script>window.location.href = "latest/";</script>
89+
</head>
90+
<body>
91+
<p>Redirecting to <a href="latest/">latest documentation</a>...</p>
92+
</body>
93+
</html>
94+
EOF
95+
96+
- name: Upload artifact
97+
if: github.event_name == 'push'
98+
uses: actions/upload-pages-artifact@v3
99+
with:
100+
path: _site
101+
102+
deploy:
103+
if: github.event_name == 'push'
104+
needs: build
105+
runs-on: ubuntu-latest
106+
environment:
107+
name: github-pages
108+
url: ${{ steps.deployment.outputs.page_url }}
109+
steps:
110+
- name: Deploy to GitHub Pages
111+
id: deployment
112+
uses: actions/deploy-pages@v4

.github/workflows/release.yml

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -247,22 +247,3 @@ jobs:
247247
env:
248248
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
249249
run: cargo publish --allow-dirty
250-
251-
create-release:
252-
needs: [build-and-test, build-wheels, publish-python, publish-rust]
253-
runs-on: ubuntu-latest
254-
255-
steps:
256-
- uses: actions/checkout@v4
257-
258-
- name: Download all artifacts
259-
uses: actions/download-artifact@v4
260-
with:
261-
path: artifacts
262-
263-
- name: Create GitHub Release
264-
uses: softprops/action-gh-release@v1
265-
with:
266-
files: |
267-
artifacts/**/*
268-
generate_release_notes: true

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ dist/
115115
*.egg
116116
.eggs/
117117
*.whl
118+
.venv/
119+
120+
# Example data files
121+
examples/**/data/
122+
examples/**/*.db
118123

119124
# Rust
120125
target/

0 commit comments

Comments
 (0)