Skip to content

Commit 3e48dfa

Browse files
author
River@devbox
committed
Update to new site
1 parent 104985e commit 3e48dfa

File tree

384 files changed

+87735
-25431
lines changed

Some content is hidden

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

384 files changed

+87735
-25431
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ nosetests.xml
4040
qpython-docs/venv/*
4141
qpython-docs/build/*
4242
qpython-docs/static/*
43+
venv

CLAUDE.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
This is the QPython website and documentation repository (www.qpython.org). QPython is a Python script engine for Android devices. The site is built with [Sphinx](https://www.sphinx-doc.org/) using reStructuredText (.rst) source files.
8+
9+
## Build Commands
10+
11+
All build commands should be run from the `qpython-docs/` directory:
12+
13+
```bash
14+
cd qpython-docs
15+
```
16+
17+
### Development Build (Local Testing)
18+
19+
Build HTML documentation for local testing:
20+
21+
```bash
22+
make html
23+
```
24+
25+
Output will be in `qpython-docs/build/html/`. Open `build/html/index.html` in a browser to preview.
26+
27+
### Production Build (Deployment)
28+
29+
Build the full site including analytics, static file processing, and copy to the deployment directory:
30+
31+
```bash
32+
./build.sh
33+
```
34+
35+
This script:
36+
1. Removes the existing `docs/` folder at the repository root
37+
2. Runs `make html` to build the documentation
38+
3. Adds Google Analytics and Facebook comments via `add-analytics.py`
39+
4. Renames `_static/` to `static/` and `_images/` to `images/`
40+
5. Copies additional static files (CNAME, favicon.ico, index.html, privacy pages, etc.)
41+
6. Outputs final site to `/docs/` (which is deployed via GitHub Pages)
42+
43+
### Other Useful Commands
44+
45+
```bash
46+
make clean # Remove build artifacts
47+
make linkcheck # Check for broken external links
48+
make doctest # Run doctests in documentation
49+
```
50+
51+
## Project Architecture
52+
53+
### Directory Structure
54+
55+
```
56+
qpython-docs/
57+
├── source/ # Documentation source files (.rst)
58+
│ ├── document.rst # Main toctree (entry point)
59+
│ ├── conf.py # Sphinx configuration
60+
│ ├── _static/ # Static assets (CSS, images)
61+
│ ├── en/ # English documentation
62+
│ │ ├── guide.rst
63+
│ │ ├── faq.rst
64+
│ │ └── ...
65+
│ ├── zh/ # Chinese documentation
66+
│ └── qpython_theme/ # Custom Sphinx theme
67+
│ └── __init__.py
68+
├── build.sh # Production build script
69+
├── add-analytics.py # Post-processor for analytics injection
70+
├── extra.txt # Analytics code template
71+
├── requirements.txt # Python dependencies
72+
└── Makefile # Sphinx build commands
73+
74+
docs/ # Built site (deployment target)
75+
├── index.html # Site homepage
76+
├── document.html # Documentation homepage
77+
├── en/ # Built English docs
78+
├── _sources/ # Source archives (for Sphinx)
79+
└── ...
80+
```
81+
82+
### Key Files
83+
84+
- **`qpython-docs/source/conf.py`**: Sphinx configuration including theme (`qpython_theme`), version, and extensions
85+
- **`qpython-docs/source/document.rst`**: Main documentation entry point with toctree
86+
- **`qpython-docs/build.sh`**: Production build script that processes the Sphinx output and prepares it for deployment
87+
- **`qpython-docs/extra.txt`**: Template for injecting Google Analytics and Facebook comments into HTML
88+
- **`docs/CNAME`**: Configures custom domain (www.qpython.org) for GitHub Pages
89+
90+
### Custom Theme
91+
92+
The documentation uses a custom Sphinx theme located at `qpython-docs/source/qpython_theme/`. The theme path is registered in `conf.py` via the `qpython_theme` package.
93+
94+
### Documentation Languages
95+
96+
- English: `qpython-docs/source/en/`
97+
- Chinese: `qpython-docs/source/zh/`
98+
99+
Each language has its own toctree structure. The master document (`document.rst`) includes the English guide by default and links to Chinese content via `zhindex.rst`.
100+
101+
### Deployment
102+
103+
The `docs/` folder at the repository root is the deployment target. It is served via GitHub Pages. After making changes:
104+
105+
1. Run `./build.sh` to rebuild the site
106+
2. Commit the changes in both `qpython-docs/source/` (source) and `docs/` (built output)
107+
3. Push to deploy

docs/.buildinfo

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/CNAME

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/_sources/contributors.rst.txt

Lines changed: 0 additions & 61 deletions
This file was deleted.

docs/_sources/document.rst.txt

Lines changed: 0 additions & 111 deletions
This file was deleted.

docs/_sources/en/faq.rst.txt

Lines changed: 0 additions & 26 deletions
This file was deleted.

docs/_sources/en/guide.rst.txt

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)