Skip to content

Commit d754876

Browse files
authored
Merge pull request #38 from james-see/feature/github-pages
Fix landing page to focus on project, not infrastructure
2 parents 2207a4b + bbbcd9c commit d754876

File tree

2 files changed

+26
-113
lines changed

2 files changed

+26
-113
lines changed

docs/README.md

Lines changed: 4 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,11 @@
1-
# Python Examples Documentation Site
2-
3-
This is the source for the GitHub Pages documentation site for python-examples.
4-
5-
## 🚀 Built With
6-
7-
- **Astro** - Fast, content-focused static site generator
8-
- **Academic Paper Design** - Clean, professional typography inspired by research papers
9-
- **Interactive Filtering** - Search and filter examples by category
10-
- **Personality** - Easter eggs and touches that show character
11-
12-
## 🛠️ Development
1+
# Documentation Site Development
132

3+
Dev commands:
144
```bash
155
cd docs
16-
17-
# Install dependencies
186
npm install
19-
20-
# Start dev server
21-
npm run dev
22-
23-
# Build for production
7+
npm run dev # localhost:4321
248
npm run build
25-
26-
# Preview production build
27-
npm run preview
28-
```
29-
30-
## 📁 Structure
31-
32-
```
33-
docs/
34-
├── src/
35-
│ ├── layouts/ # Page layouts
36-
│ ├── pages/ # Astro pages
37-
│ ├── styles/ # Global CSS
38-
│ └── components/ # Reusable components (future)
39-
├── public/ # Static assets
40-
└── astro.config.mjs # Astro configuration
41-
```
42-
43-
## 🎨 Design Philosophy
44-
45-
- **Academic aesthetic** - Serif fonts, paper-like background, numbered sections
46-
- **Monospace code** - JetBrains Mono for all code examples
47-
- **Accent color** - Burnt orange (#d35400) for personality
48-
- **Clean typography** - Crimson Pro for body, Inter for UI elements
49-
- **Interactive** - Search, filters, and easter eggs for engagement
50-
51-
## 🚀 Deployment
52-
53-
The site automatically deploys to GitHub Pages when changes are pushed to master via GitHub Actions.
54-
55-
## 🎯 Features
56-
57-
- ✅ Responsive design
58-
- ✅ Search functionality
59-
- ✅ Category filtering
60-
- ✅ Print-friendly (for actual paper)
61-
- ✅ Easter egg (Konami code)
62-
- ✅ Fast static site generation
63-
- ✅ Academic paper styling
64-
65-
## 📝 Adding New Examples
66-
67-
Edit `src/pages/index.astro` and add to the `examples` array:
68-
69-
```javascript
70-
{
71-
title: 'your-example.py',
72-
description: 'What it does',
73-
category: 'Category Name',
74-
tags: ['tag1', 'tag2'],
75-
difficulty: 'beginner' // or 'intermediate', 'advanced'
76-
}
779
```
7810

79-
The site will automatically update filters and search.
11+
To add examples, edit `src/pages/index.astro`.

docs/src/pages/index.astro

Lines changed: 22 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,6 @@
22
import Layout from '../layouts/Layout.astro';
33
44
const examples = [
5-
// LLM & AI
6-
{
7-
title: 'openai_gpt-example.py',
8-
description: 'Chat completions, streaming, function calling, JSON mode with GPT-4',
9-
category: 'LLM & AI',
10-
tags: ['openai', 'gpt', 'chat', 'streaming'],
11-
difficulty: 'intermediate'
12-
},
13-
{
14-
title: 'anthropic_claude-example.py',
15-
description: 'Claude 3.5 integration with vision, streaming, and extended thinking',
16-
category: 'LLM & AI',
17-
tags: ['anthropic', 'claude', 'vision', 'ai'],
18-
difficulty: 'intermediate'
19-
},
20-
{
21-
title: 'langchain-example.py',
22-
description: 'LangChain framework: chains, memory, RAG, and prompt templates',
23-
category: 'LLM & AI',
24-
tags: ['langchain', 'rag', 'agents', 'chains'],
25-
difficulty: 'advanced'
26-
},
27-
{
28-
title: 'instructor-example.py',
29-
description: 'Type-safe structured outputs from LLMs using Pydantic',
30-
category: 'LLM & AI',
31-
tags: ['instructor', 'pydantic', 'structured', 'validation'],
32-
difficulty: 'intermediate'
33-
},
345
// Network & APIs
356
{
367
title: 'grpcio-example.py',
@@ -142,10 +113,10 @@ const totalExamples = examples.length;
142113
<div class="abstract">
143114
<div class="abstract-title">Abstract</div>
144115
<p>
145-
This repository presents a comprehensive collection of Python examples demonstrating
146-
modern development patterns, from cutting-edge LLM integrations to classic data processing.
147-
Each example prioritizes security, type safety, and real-world applicability.
148-
Built for developers who value clarity, efficiency, and getting things done.
116+
A curated collection of practical Python code examples covering web APIs, data processing,
117+
security tools, web scraping, and file manipulation. Each example is production-ready with
118+
proper error handling, security considerations, and clear documentation. Built by a developer
119+
who automates everything and believes good examples are better than lengthy tutorials.
149120
</p>
150121
</div>
151122

@@ -204,17 +175,27 @@ cd python-examples
204175
# Install dependencies (using uv)
205176
uv sync --dev
206177

207-
# Run an example
178+
# Run any example
208179
cd python-examples
209-
python openai_gpt-example.py</code></pre>
180+
python requests-example.py</code></pre>
181+
182+
<h2>Why This Collection?</h2>
183+
<ul style="font-family: var(--font-sans); font-size: 1rem; line-height: 2; margin-left: 2rem;">
184+
<li><strong>Copy-Paste Ready</strong> - Working code you can use immediately</li>
185+
<li><strong>Security Focused</strong> - Input validation, secure defaults, CodeQL verified</li>
186+
<li><strong>Modern Python 3.12+</strong> - Using latest features and best practices</li>
187+
<li><strong>Real-World Examples</strong> - Actual use cases, not toy demos</li>
188+
<li><strong>No Fluff</strong> - Code first, explanations when needed</li>
189+
</ul>
210190

211-
<h2>Features</h2>
191+
<h2>Popular Examples</h2>
212192
<ul style="font-family: var(--font-sans); font-size: 1rem; line-height: 2; margin-left: 2rem;">
213-
<li><strong>Modern Python 3.12+</strong> - Leveraging latest language features</li>
214-
<li><strong>Type Safety</strong> - Pydantic models and type hints throughout</li>
215-
<li><strong>Security First</strong> - Input validation, secure defaults, CodeQL verified</li>
216-
<li><strong>Production Ready</strong> - Error handling, logging, and best practices</li>
217-
<li><strong>Well Documented</strong> - Clear docstrings and usage examples</li>
193+
<li><strong>gRPC</strong> - Modern RPC framework with protocol buffers</li>
194+
<li><strong>Flask</strong> - Web API with secure file uploads</li>
195+
<li><strong>Scrapy</strong> - Web scraping at scale</li>
196+
<li><strong>Tor Integration</strong> - Anonymous network access</li>
197+
<li><strong>Shodan API</strong> - Internet device search and OSINT</li>
198+
<li><strong>OpenCV</strong> - Computer vision and face detection</li>
218199
</ul>
219200

220201
<footer class="site-footer">

0 commit comments

Comments
 (0)