Skip to content

Commit a3531e5

Browse files
feat: support faq.yml that will be used to generate the FAQs section in the project website
1 parent da5c124 commit a3531e5

12 files changed

Lines changed: 1407 additions & 21 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
## Problem
3232
Going from **writing Python code to publishing and maintaining a package** is **time-consuming**.
33-
First-time maintainers must learn multiple tools and concepts, e.g. [MyST], [SemVer], CI/CD ([pre-commit] hooks, GitHub workflows), and they often spending hours just to deploy a documentation site whereas well-resourced projects like [PyTorch] and [Scikit-Learn] have **dedicated websites** that serve as their project hubs.
33+
First-time maintainers must learn multiple tools and concepts, e.g. [MyST], [SemVer], CI/CD ([pre-commit] hooks, GitHub workflows), and they often spend hours just to deploy a documentation site whereas well-resourced projects like [PyTorch] and [Scikit-Learn] have **dedicated websites** that serve as their project hubs.
3434

3535

3636
## Solution
@@ -45,8 +45,8 @@ First-time maintainers must learn multiple tools and concepts, e.g. [MyST], [Sem
4545
- [x] Go from writing to **website deployment in minutes** — no need to learn any of the underlying tools
4646
- [x] Centralize all your content in a modern, **unified project website** — from documentation to blog posts
4747
- [x] Zero-config orchestration — Pre-configured modern tooling with sane defaults (see [Tech Stack](#tech-stack)), so you can start maintaining packages immediately **without learning each tool**
48+
- [x] **⚡ Full-text search** across **ALL** your content in your website — docs, blogs, tutorials, everything
4849
- [ ] Export content as PDF — for example, combine all blog posts into a single PDF file
49-
- [ ] **⚡ Full-text search** across **ALL** your content in your website — docs, blogs, tutorials, everything
5050
- [ ] **🤖 Embedded AI Chatbot** that answers questions directly using an in-browser LLM — at no cost
5151

5252
---

afterpython/_website/static/llms.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
## Problem
2020
Going from **writing Python code to publishing and maintaining a package** is **time-consuming**.
21-
First-time maintainers must learn multiple tools and concepts, e.g. [MyST], [SemVer], CI/CD ([pre-commit] hooks, GitHub workflows), and they often spending hours just to deploy a documentation site whereas well-resourced projects like [PyTorch] and [Scikit-Learn] have **dedicated websites** that serve as their project hubs.
21+
First-time maintainers must learn multiple tools and concepts, e.g. [MyST], [SemVer], CI/CD ([pre-commit] hooks, GitHub workflows), and they often spend hours just to deploy a documentation site whereas well-resourced projects like [PyTorch] and [Scikit-Learn] have **dedicated websites** that serve as their project hubs.
2222

2323
## Solution
2424
`afterpython` **automates** the tedious parts of Python package maintenance and generates a **project website** for **building community** and **hosting content** such as documentation, **blog posts**, tutorials, examples and more — empowering more developers to write packages with ease.
@@ -31,8 +31,8 @@ First-time maintainers must learn multiple tools and concepts, e.g. [MyST], [Sem
3131
- [x] Go from writing to **website deployment in minutes** — no need to learn any of the underlying tools
3232
- [x] Centralize all your content in a modern, **unified project website** — from documentation to blog posts
3333
- [x] Zero-config orchestration — Pre-configured modern tooling with sane defaults (see [Tech Stack](#tech-stack)), so you can start maintaining packages immediately **without learning each tool**
34+
- [x] **⚡ Full-text search** across **ALL** your content in your website — docs, blogs, tutorials, everything
3435
- [ ] Export content as PDF — for example, combine all blog posts into a single PDF file
35-
- [ ] **⚡ Full-text search** across **ALL** your content in your website — docs, blogs, tutorials, everything
3636
- [ ] **🤖 Embedded AI Chatbot** that answers questions directly using an in-browser LLM — at no cost
3737

3838
---
@@ -81,6 +81,8 @@ ap tui
8181
<!-- - ty -->
8282
<!-- - [pixi] -->
8383

84+
> Every link below points to the raw markdown source of the page. Fetch any URL directly to read its content as markdown.
85+
8486
## Documentation
8587

8688
> CLI tool to streamline Python package maintenance and generate a dedicated project website

afterpython/doc/project_website.md

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,16 +145,35 @@ featured_post = "getting-started.md"
145145
```
146146

147147
---
148-
## 🚧 Built-in Features
148+
## Built-in Features
149149
- full-text search using [PageFind]
150-
- AI chatbot using [WebLLM]
150+
- 🚧 AI chatbot using [WebLLM]
151+
152+
### FAQs
153+
`afterpython/faq.yml` is rendered as the FAQs section on the project website. Each item needs a `question` and `answer`; `category` is optional.
154+
155+
```yaml
156+
- question: How do I install it?
157+
answer: Run `pip install afterpython`, then `ap init`.
158+
category: Getting Started
159+
160+
- question: Can I write content in Jupyter notebooks?
161+
answer: |
162+
Yes — `.ipynb` files in `afterpython/tutorials/` are auto-converted.
163+
See the **[quickstart](/doc/quickstart)** for details.
164+
category: Getting Started
165+
166+
- question: Is AfterPython free?
167+
answer: Yes, it is free and open source.
168+
```
169+
170+
Both `question` and `answer` accept Markdown — inline code, links, lists, fenced code blocks, etc.
171+
172+
Categories are displayed in the order they first appear in `faq.yml`, so order your questions to control category order.
151173

152174
### API Reference
153175
[great-docs] will be used to build the API Reference section on the project website.
154176

155-
### FAQs
156-
`faq.yml` will be used as content for the FAQs section on the project website.
157-
158177
### Google Analytics
159178
add google analytics support for the entire website
160179

afterpython/doc/references/roadmap.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,7 @@
44
This roadmap is tentative and subject to change
55
```
66

7-
- add `FAQ` section to the project website and handle `faq.yml`
8-
- add announcement section to the landing page
9-
- convert blog posts to format compatible with medium.com and substack.com
107
- AI chatbot like kapa.ai using WebLLM
11-
- full-text search engine using pagefind
128
- incremental build, only build changed content (for `ap dev`)
139
- integrate with `git-cliff` for changelog generation
1410
- supports docs built by different engines? e.g. Sphix, MkDocs
@@ -18,6 +14,5 @@ This roadmap is tentative and subject to change
1814
- very difficult, need to create an interactive UX to show the diffs and let the user choose to merge or not
1915
- add type checker using `ty`
2016
- support python 3.14
21-
- `pcu` should support updating the versions in `pixi.toml`
2217
- integrate with `pixi`, supports `conda install`
2318
- support testing across multiple os in ci.yml based on `platforms` set in `pixi.toml`?

afterpython/faq.yml

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

afterpython/faq_sample.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Exercises:
2+
# - Plain text, inline code, bold/italic, links, lists, multi-line code blocks
3+
# - Items with and without `category`
4+
# - Multiple items sharing a category (to test grouping)
5+
# - First-appearance category ordering: "Getting Started" -> "Usage" -> "Troubleshooting"
6+
7+
- question: What is AfterPython?
8+
answer: AfterPython is a CLI that automates Python project maintenance and generates a project website from your `afterpython/` content folder.
9+
10+
- question: How do I install it?
11+
answer: Run `pip install afterpython`, then `ap init` inside your project root. See the **[quickstart](/doc/quickstart)** for the full walkthrough.
12+
category: Getting Started
13+
14+
- question: What does `ap init` set up for me?
15+
answer: |
16+
`ap init` configures:
17+
- Pre-commit hooks (ruff, mypy)
18+
- Conventional commits via *commitizen*
19+
- Semantic-release for versioning
20+
- The project website scaffold under `afterpython/`
21+
category: Getting Started
22+
23+
- question: How do I run the dev server?
24+
answer: |
25+
Use `ap dev` from your project root:
26+
27+
```bash
28+
cd my-project
29+
ap dev
30+
```
31+
32+
This boots the SvelteKit template at `http://localhost:5173`.
33+
category: Usage
34+
35+
- question: Can I write content in Jupyter notebooks?
36+
answer: Yes — `.ipynb` files in `afterpython/tutorials/` or `afterpython/blog/` are auto-converted. *Marimo* notebooks and **MyST Markdown** are also supported.
37+
category: Usage
38+
39+
- question: "Why does `ap build` fail with: `No pyproject.toml found`?"
40+
answer: |
41+
AfterPython locates the project root by walking up from your current directory looking for `pyproject.toml`. Make sure:
42+
43+
1. You're inside a Python project
44+
2. `pyproject.toml` exists at or above your `cwd`
45+
3. You haven't accidentally `cd`'d into a sibling directory
46+
category: Troubleshooting
47+
48+
- question: Does this work without a GitHub repository?
49+
answer: Yes. The website builds fine locally; only `ap release` and GitHub Pages deploys require a remote.
50+
51+
- question: How do I customize the website's styling?
52+
answer: |
53+
The frontend is a SvelteKit app under `afterpython/_website/`. Edit `src/app.css` or any component in `src/lib/components/`. The template uses **Tailwind CSS v4** — see the [Tailwind docs](https://tailwindcss.com/docs).

0 commit comments

Comments
 (0)