Skip to content

Commit aae4fe4

Browse files
docs: finish Concepts section
1 parent 3c157d1 commit aae4fe4

File tree

7 files changed

+67
-82
lines changed

7 files changed

+67
-82
lines changed

afterpython/doc/concepts.md

Lines changed: 50 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,53 @@
1-
# Concepts
2-
3-
::::{aside}
4-
:::{glossary}
5-
MyST Markdown
6-
: MyST Markdown is a superset of Markdown that adds support for Sphinx-style directives and roles.
7-
:::
8-
9-
:::{glossary}
10-
Jupyter Notebook
11-
: Jupyter Notebook is an interactive computational environment that allows you to write and execute code in a notebook format.
12-
:::
13-
14-
:::{glossary}
15-
pre-commit
16-
: pre-commit is a tool that allows you to run checks on your code before you commit it.
17-
:::
18-
19-
:::{glossary}
20-
GitHub Actions
21-
: GitHub Actions is a CI/CD platform that allows you to automate your workflow.
22-
:::
23-
::::
24-
25-
26-
## How It Works
27-
`afterpython` uses [MyST Document Engine] under the hood so you can write content in [MyST Markdown] and [Jupyter Notebook], then builds a project website using a [template] to display all your content in an organized way.
1+
[mystmd]: https://mystmd.org
2+
[commitizen]: https://github.com/commitizen-tools/commitizen
3+
[pre-commit]: https://github.com/pre-commit/pre-commit
4+
[ruff]: https://github.com/astral-sh/ruff
285

6+
# Concepts
297

308
## afterpython/ Folder
31-
aim to store everything python project related
32-
provide a structured way
33-
34-
35-
## Structure / Content Types
36-
explain each of their definitions
37-
- content
38-
- doc
39-
- blog
40-
- tutorial
41-
- example
42-
- guide
43-
-
9+
The `afterpython/` folder serves as a centralized location for both your project website content and maintenance tool configurations. It contains:
10+
11+
**Content directories:**
12+
- `afterpython/doc/` - Documentation
13+
- `afterpython/blog/` - Blog posts
14+
- `afterpython/tutorial/` - Tutorials
15+
- `afterpython/example/` - Examples
16+
- `afterpython/guide/` - How-to Guides
17+
18+
**Configuration files:**
19+
- `cz.toml` for [commitizen]
20+
- `ruff.toml` for [ruff]
21+
- `.pre-commit-config.yaml` for [pre-commit]
22+
- `authors.yml` for [mystmd]
23+
- `afterpython.toml` for `afterpython` itself
24+
25+
**Purpose:**
26+
27+
This structure serves two goals:
28+
29+
1. **Declutter the root directory** - Keeps maintenance-related configuration files separate from package code, making the project structure cleaner
30+
2. **Provide sane defaults** - Comes pre-configured with sensible defaults for common maintenance tools like [commitizen], [pre-commit], and [ruff], so you can start using them immediately
31+
32+
33+
---
34+
## afterpython.toml
35+
`afterpython.toml` is a configuration file for `afterpython`. Think of it as an extension of `pyproject.toml`, storing extra information about your project such as company name, company URL, project website URL, etc. Currently it only supports the following fields:
36+
37+
```toml
38+
[company]
39+
name = "Your Company Name"
40+
url = "https://your-company.com"
41+
42+
[website]
43+
url = "https://your-project-website.com"
44+
```
45+
46+
---
47+
## Content Types
48+
- **Documentation** (`afterpython/doc/`) - Conceptual explanations on how the project works
49+
- **Blog** (`afterpython/blog/`) - Project updates, announcements, and release notes
50+
- **Tutorials** (`afterpython/tutorial/`) - Step-by-step learning guides
51+
- **Examples** (`afterpython/example/`) - Real-world code examples/snippets
52+
- **Guides** (`afterpython/guide/`) - Task-oriented how-to instructions
53+
- **API Reference** (`afterpython/reference/`) - Auto-generated API documentation from docstrings

afterpython/doc/myst.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ project:
3535
toc:
3636
- file: overview.md
3737
- file: quickstart.md
38-
- file: walkthrough.md
3938
- file: concepts.md
4039
- file: myst.md
4140
- file: project_website.md

afterpython/doc/overview.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
- Write content directly in [MyST Markdown] or [Jupyter Notebook]
2525
- Go from writing to website deployment in minutes — no need to learn any of the underlying tools
2626
- Centralize all your content in a modern, unified project website — from documentation to blog posts
27-
- (Work In Progress) Export content as PDF — for example, combine all blog posts into a single PDF file
28-
- (Work In Progress) **⚡ Full-text search** across **ALL** your content in your website — docs, blogs, tutorials, everything
29-
- (Work In Progress) **🤖 Embedded AI Chatbot** that answers questions directly using an in-browser LLM — at no cost
27+
- 🚧 Export content as PDF — for example, combine all blog posts into a single PDF file
28+
- 🚧 **⚡ Full-text search** across **ALL** your content in your website — docs, blogs, tutorials, everything
29+
- 🚧 **🤖 Embedded AI Chatbot** that answers questions directly using an in-browser LLM — at no cost
3030

3131
---
3232
## Tech Stack

afterpython/doc/project_website.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,15 @@ When updates are available, run `ap update website`, which will update `afterpyt
5858
## Customization and Styling
5959
Since all the code is pulled from [project-website-template] to `afterpython/_website/`, you can customize the project website by modifying the code in `afterpython/_website/src/`.
6060

61+
62+
### Landing Page
6163
For example, to change the landing page, which by default displays the `README.md`, you can modify the code in `afterpython/_website/src/routes/+page.svelte`.
6264

6365
> If you don't know Svelte and are using an LLM to code for you, remember to ask it to write in Svelte 5 syntax.
6466
67+
### Static Files
68+
All static files (e.g. `logo.svg`, `favicon.svg`, images, css files, etc.) should be put in the `afterpython/static/` directory.
69+
They will be automatically copied to the `afterpython/_website/static/` directory during `ap build`.
6570

6671
---
6772
## Work in Progress 🚧

afterpython/doc/quickstart.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,8 @@ A project website is basically a website that serves as the **homepage for your
3030

3131
It aggregates and presents all your content in one place, including documentation, blog posts, tutorials, examples, and how-to guides.
3232

33+
To **set the logo and favicon** for the project website, put your `logo.svg` and `favicon.svg` in the `afterpython/static/` directory.
34+
3335
See [](project_website.md) for more details.
3436

3537
---
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
11
# CLI Commands
2+
3+
:::{caution}
4+
Since configuration files are stored in `afterpython/` rather than the root directory (where `pyproject.toml` lives), some tools that only search the root directory by default (e.g., [pre-commit]) require special handling. You have two options:
5+
6+
1. Use CLI commands wrapped by `ap` (e.g., `ap pre-commit ...`), which will automatically use the configuration files in `afterpython/` by default,
7+
2. Move the configuration files to the root directory manually if you prefer using native commands directly (e.g., `pre-commit ...`)
8+
:::

afterpython/doc/walkthrough.md

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

0 commit comments

Comments
 (0)