Skip to content

Commit da8e74c

Browse files
committed
feat: add left sidebar navigation for better UX
- Create custom Jekyll layout with left sidebar navigation - Add anchor IDs to page sections for direct linking - Organize sidebar into logical sections: - Getting Started (Installation, Basic Usage, Configuration) - Core Features (Memory Management, Session Management, Search, Advanced) - Intelligence & Security (Intelligence Gathering, MITRE ATT&CK, Reverse Engineering, Security Patterns) - Integration & Development (AI Integration, Authorization, General Integration) - Technical Reference (API Reference, Contributing) - Add responsive design for mobile devices - Include JavaScript for active link highlighting - Improve navigation experience with easy section jumping
1 parent e7f06ae commit da8e74c

5 files changed

Lines changed: 184 additions & 8 deletions

File tree

_config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ baseurl: "/tinybrain"
1010
# Theme Configuration
1111
theme: jekyll-theme-minimal
1212

13+
# Custom Layout
14+
1315
# Build Settings
1416
markdown: kramdown
1517
highlighter: rouge

_layouts/default.html

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,174 @@
1+
<!DOCTYPE html>
2+
<html lang="{{ page.lang | default: site.lang | default: 'en' }}">
3+
<head>
4+
<meta charset="utf-8">
5+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6+
<meta name="viewport" content="width=device-width, initial-scale=1">
7+
8+
<title>{% if page.title %}{{ page.title | escape }}{% else %}{{ site.title | escape }}{% endif %}</title>
9+
<meta name="description" content="{% if page.excerpt %}{{ page.excerpt | strip_html | strip_newlines | truncate: 160 }}{% else %}{{ site.description }}{% endif %}">
10+
11+
<link rel="stylesheet" href="{{ '/assets/css/style.css' | relative_url }}">
12+
<link rel="canonical" href="{{ page.url | replace:'index.html','' | relative_url }}">
13+
<link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ '/feed.xml' | relative_url }}">
14+
15+
<style>
16+
.container {
17+
display: flex;
18+
max-width: 1200px;
19+
margin: 0 auto;
20+
padding: 20px;
21+
}
22+
23+
.sidebar {
24+
width: 250px;
25+
flex-shrink: 0;
26+
margin-right: 30px;
27+
padding-right: 20px;
28+
border-right: 1px solid #e1e4e8;
29+
}
30+
31+
.main-content {
32+
flex: 1;
33+
min-width: 0;
34+
}
35+
36+
.sidebar h3 {
37+
margin-top: 0;
38+
margin-bottom: 10px;
39+
font-size: 16px;
40+
font-weight: 600;
41+
color: #24292e;
42+
}
43+
44+
.sidebar ul {
45+
list-style: none;
46+
padding: 0;
47+
margin: 0 0 20px 0;
48+
}
49+
50+
.sidebar li {
51+
margin-bottom: 5px;
52+
}
53+
54+
.sidebar a {
55+
display: block;
56+
padding: 5px 10px;
57+
color: #586069;
58+
text-decoration: none;
59+
border-radius: 3px;
60+
font-size: 14px;
61+
}
62+
63+
.sidebar a:hover {
64+
background-color: #f6f8fa;
65+
color: #0366d6;
66+
}
67+
68+
.sidebar a.active {
69+
background-color: #0366d6;
70+
color: white;
71+
}
72+
73+
.sidebar .section {
74+
margin-bottom: 30px;
75+
}
76+
77+
.sidebar .section-title {
78+
font-size: 18px;
79+
font-weight: 600;
80+
color: #24292e;
81+
margin-bottom: 15px;
82+
padding-bottom: 5px;
83+
border-bottom: 2px solid #e1e4e8;
84+
}
85+
86+
@media (max-width: 768px) {
87+
.container {
88+
flex-direction: column;
89+
}
90+
91+
.sidebar {
92+
width: 100%;
93+
margin-right: 0;
94+
margin-bottom: 20px;
95+
padding-right: 0;
96+
border-right: none;
97+
border-bottom: 1px solid #e1e4e8;
98+
padding-bottom: 20px;
99+
}
100+
}
101+
</style>
102+
</head>
103+
104+
<body>
105+
<div class="container">
106+
<nav class="sidebar">
107+
<div class="section">
108+
<div class="section-title">Getting Started</div>
109+
<ul>
110+
<li><a href="{{ '/getting-started/#installation' | relative_url }}">Installation</a></li>
111+
<li><a href="{{ '/getting-started/#basic-usage' | relative_url }}">Basic Usage</a></li>
112+
<li><a href="{{ '/getting-started/#configuration' | relative_url }}">Configuration</a></li>
113+
</ul>
114+
</div>
115+
116+
<div class="section">
117+
<div class="section-title">Core Features</div>
118+
<ul>
119+
<li><a href="{{ '/core-features/#memory-management' | relative_url }}">Memory Management</a></li>
120+
<li><a href="{{ '/core-features/#session-management' | relative_url }}">Session Management</a></li>
121+
<li><a href="{{ '/core-features/#search-capabilities' | relative_url }}">Search Capabilities</a></li>
122+
<li><a href="{{ '/advanced-features/' | relative_url }}">Advanced Features</a></li>
123+
</ul>
124+
</div>
125+
126+
<div class="section">
127+
<div class="section-title">Intelligence & Security</div>
128+
<ul>
129+
<li><a href="{{ '/intelligence/#intelligence-types' | relative_url }}">Intelligence Gathering</a></li>
130+
<li><a href="{{ '/intelligence/#mitre-attack-integration' | relative_url }}">MITRE ATT&CK Integration</a></li>
131+
<li><a href="{{ '/reverse-engineering/' | relative_url }}">Reverse Engineering</a></li>
132+
<li><a href="{{ '/security-patterns/' | relative_url }}">Security Patterns</a></li>
133+
</ul>
134+
</div>
135+
136+
<div class="section">
137+
<div class="section-title">Integration & Development</div>
138+
<ul>
139+
<li><a href="{{ '/ai-integration/' | relative_url }}">AI Integration</a></li>
140+
<li><a href="{{ '/authorization/' | relative_url }}">Authorization</a></li>
141+
<li><a href="{{ '/integration/' | relative_url }}">General Integration</a></li>
142+
</ul>
143+
</div>
144+
145+
<div class="section">
146+
<div class="section-title">Technical Reference</div>
147+
<ul>
148+
<li><a href="{{ '/api-reference/' | relative_url }}">API Reference</a></li>
149+
<li><a href="{{ '/contributing/' | relative_url }}">Contributing</a></li>
150+
</ul>
151+
</div>
152+
</nav>
153+
154+
<main class="main-content">
155+
{{ content }}
156+
</main>
157+
</div>
158+
159+
<script>
160+
// Add active class to current page links
161+
document.addEventListener('DOMContentLoaded', function() {
162+
const currentPath = window.location.pathname;
163+
const links = document.querySelectorAll('.sidebar a');
164+
165+
links.forEach(function(link) {
166+
const href = link.getAttribute('href');
167+
if (href && currentPath.includes(href.replace('#', '').replace(/\//g, ''))) {
168+
link.classList.add('active');
169+
}
170+
});
171+
});
172+
</script>
173+
</body>
174+
</html>

_pages/core-features.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ permalink: /core-features/
66

77
# Core Features
88

9-
## Memory Management
9+
## Memory Management {#memory-management}
1010

1111
TinyBrain provides sophisticated memory management capabilities designed for security professionals:
1212

@@ -24,7 +24,7 @@ TinyBrain provides sophisticated memory management capabilities designed for sec
2424
- **Delete**: Secure deletion with audit trails
2525
- **Archive**: Long-term storage for completed assessments
2626

27-
## Session Management
27+
## Session Management {#session-management}
2828

2929
### Session Types
3030
- **Security Review**: Code review and vulnerability assessment
@@ -42,7 +42,7 @@ TinyBrain provides sophisticated memory management capabilities designed for sec
4242
- **Metadata Storage**: Rich metadata for session context
4343
- **Collaboration**: Share sessions with team members
4444

45-
## Search Capabilities
45+
## Search Capabilities {#search-capabilities}
4646

4747
### Search Types
4848
- **Full-text Search**: Fast text-based searching

_pages/getting-started.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ permalink: /getting-started/
66

77
# Getting Started
88

9-
## Installation
9+
## Installation {#installation}
1010

1111
### From Source
1212
```bash
@@ -22,7 +22,7 @@ docker run -p 8080:8080 rainmana/tinybrain
2222
### Pre-built Binaries
2323
Download from [Releases](https://github.com/rainmana/tinybrain/releases)
2424

25-
## Basic Usage
25+
## Basic Usage {#basic-usage}
2626

2727
### 1. Start the Server
2828
```bash
@@ -54,7 +54,7 @@ curl -X POST http://localhost:8080/memory \
5454
}'
5555
```
5656

57-
## Configuration
57+
## Configuration {#configuration}
5858

5959
### Basic Configuration
6060
Create a `config.json` file:

_pages/intelligence.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ permalink: /intelligence/
88

99
TinyBrain provides comprehensive intelligence gathering and reconnaissance capabilities for security professionals.
1010

11-
## Intelligence Types
11+
## Intelligence Types {#intelligence-types}
1212

1313
### OSINT (Open Source Intelligence)
1414
- **Social Media Analysis**: Monitor social platforms for threat intelligence
@@ -66,7 +66,7 @@ TinyBrain provides comprehensive intelligence gathering and reconnaissance capab
6666
- **Incident Intelligence**: Security incident analysis
6767
- **Cyber Forensics**: Digital forensics analysis
6868

69-
## MITRE ATT&CK Integration
69+
## MITRE ATT&CK Integration {#mitre-attack-integration}
7070

7171
### Enterprise Tactics
7272
- **TA0001 - Initial Access**: Initial access techniques

0 commit comments

Comments
 (0)