Skip to content

Commit 27c386b

Browse files
docs: finish quickstart
1 parent bb7037b commit 27c386b

File tree

21 files changed

+146
-24
lines changed

21 files changed

+146
-24
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# AfterPython: Python Package Maintenance Toolkit and Project Website Generator
22

33
[![afterpython](https://afterpython.org/shield.svg)](https://afterpython.org)
4-
[![Pixi Badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/prefix-dev/pixi/main/assets/badge/v0.json)](https://pixi.sh)
54
![PyPI downloads](https://img.shields.io/pypi/dm/afterpython)
65
[![PyPI](https://img.shields.io/pypi/v/afterpython.svg)](https://pypi.org/project/afterpython)
76
![PyPI - Support Python Versions](https://img.shields.io/pypi/pyversions/afterpython)
87
[![Discussions](https://img.shields.io/badge/Discussions-Let's%20Chat-green)](https://github.com/AfterPythonOrg/afterpython/discussions)
98
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/AfterPythonOrg/afterpython)
9+
<!-- [![Pixi Badge](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/prefix-dev/pixi/main/assets/badge/v0.json)](https://pixi.sh) -->
1010

1111

1212
[MyST]: https://mystmd.org
@@ -21,6 +21,7 @@
2121
[Scikit-Learn]: https://scikit-learn.org
2222
[WebLLM]: https://webllm.mlc.ai/
2323
[project-website-template]: https://github.com/AfterPythonOrg/project-website-template
24+
[commitizen]: https://github.com/commitizen-tools/commitizen
2425
[uv]: https://docs.astral.sh/uv/
2526
[ruff]: https://docs.astral.sh/ruff/
2627

@@ -61,6 +62,7 @@ ap init
6162
- [pre-commit]
6263
- [GitHub Actions]
6364
- [pdoc]
65+
- [commitizen]
6466
- [uv]
6567
- [ruff]
6668
- [pagefind]
-9.63 KB
Binary file not shown.
Lines changed: 7 additions & 0 deletions
Loading
Lines changed: 11 additions & 1 deletion
Loading

afterpython/blog/myst.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ site:
5050
nav:
5151
- title: Docs
5252
url: https://afterpython.afterpython.org/doc
53-
- title: Blogs
54-
url: https://afterpython.afterpython.org/blog
5553
- title: Tutorials
5654
url: https://afterpython.afterpython.org/tutorial
5755
- title: Examples

afterpython/cli/commands/sync.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def sync():
7979
for content_type in CONTENT_TYPES:
8080
path = ap.paths.afterpython_path / content_type
8181
nav_bar_per_content_type = [
82-
item for item in nav_bar if item["title"] != content_type.capitalize()
82+
item for item in nav_bar if item["title"] != content_type.capitalize() + "s"
8383
]
8484
title = project_name + f"'s {content_type.capitalize()}"
8585
data = {

afterpython/doc/myst.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ project:
3535
toc:
3636
- file: overview.md
3737
- file: quickstart.md
38+
- title: Walkthrough
39+
children:
40+
- file: walkthrough/directories.md
41+
- file: walkthrough/afterpython_toml.md
42+
- file: walkthrough/static_files.md
43+
- file: walkthrough/myst_yml.md
44+
- file: walkthrough/authors_yml.md
3845
- file: concepts.md
3946
- file: myst.md
4047
- file: project_website.md
@@ -61,8 +68,6 @@ site:
6168
analytics_google: "{{ GOOGLE_ANALYTICS_ID }}"
6269
title: afterpython's Doc
6370
nav:
64-
- title: Docs
65-
url: https://afterpython.afterpython.org/doc
6671
- title: Blogs
6772
url: https://afterpython.afterpython.org/blog
6873
- title: Tutorials

afterpython/doc/overview.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
[Scikit-Learn]: https://scikit-learn.org
1111
[WebLLM]: https://webllm.mlc.ai/
1212
[project-website-template]: https://github.com/AfterPythonOrg/project-website-template
13+
[commitizen]: https://github.com/commitizen-tools/commitizen
1314
[uv]: https://docs.astral.sh/uv/
1415
[ruff]: https://docs.astral.sh/ruff/
1516

@@ -23,9 +24,9 @@
2324
- Write content directly in [MyST Markdown] or [Jupyter Notebook]
2425
- Go from writing to website deployment in minutes — no need to learn any of the underlying tools
2526
- Centralize all your content in a modern, unified project website — from documentation to blog posts
26-
- Export content as PDF — for example, combine all blog posts into a single PDF file
27-
- **⚡ Full-text search** across **ALL** your content in your website — docs, blogs, tutorials, everything
28-
- **🤖 Embedded AI Chatbot** that answers questions directly using an in-browser LLM — at no cost
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
2930

3031
---
3132
## Tech Stack
@@ -34,6 +35,7 @@
3435
- [pre-commit]
3536
- [GitHub Actions]
3637
- [pdoc]
38+
- [commitizen]
3739
- [uv]
3840
- [ruff]
3941
- [pagefind]

afterpython/doc/project_website.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ content types: doc, blog, tutorial, example, guide, etc.
3737

3838
use a full web ui framework ([Svelte]) to wrap the content and escape the scope of MyST
3939

40+
## Homepage
41+
Currently only your `README.md` is used as the homepage.
42+
4043
### API Reference
4144
use pdoc
4245
### FAQs

afterpython/doc/quickstart.md

Lines changed: 68 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,86 @@
1+
[MyST]: https://mystmd.org
2+
[MyST Markdown]: https://mystmd.org/guide/quickstart
3+
[Table of Contents]: https://mystmd.org/guide/table-of-contents
4+
5+
16
# Quickstart
27

3-
## Installation
8+
## Installation and Initialization
49

510
```bash
611
# install afterpython as a dev dependency
712
uv add --dev afterpython
8-
# initialize afterpython
13+
14+
# initialize afterpython/
915
ap init
1016
```
1117

12-
## afterpython/ Directory
13-
after initialization, a folder afterpython/ is created
18+
---
19+
## Writing Content
20+
After running `ap init`, the `afterpython/` directory is created and you can start writing content right away.
21+
22+
The structure of `afterpython/` is as follows:
23+
- `afterpython/doc/`
24+
- `afterpython/blog/`
25+
- `afterpython/tutorial/`
26+
- `afterpython/example/`
27+
- `afterpython/guide/`
28+
29+
All these subdirectories are initialized by `myst init` (see [MyST Markdown]), with a default `index.md` file for each content type.
30+
31+
For example, to start writing documentation of your project, run `ap doc` to start the development server for the `afterpython/doc/` directory, then create a new `.md` or `.ipynb` file in `afterpython/doc/`.
32+
33+
You can then view the documentation at `http://localhost:3000/` (or the port specified by `ap doc --port`).
34+
35+
Similarly, you can start the development server for other content types by running `ap blog`, `ap tutorial`, `ap example`, or `ap guide`, and then create `.md` or `.ipynb` files in the corresponding directory.
36+
37+
:::{seealso}
38+
To learn more about how to arrange your content, see [Table of Contents] or a [Quick Guide about myst.yml](walkthrough/myst_yml.md).
39+
:::
40+
41+
---
42+
## Project Website
43+
A project website is basically a website that serves as the **homepage for your project**.
1444

45+
It sits on top of your content, including documentation, blog posts, tutorials, examples, and guides.
1546

16-
## afterpython.toml
47+
You can run `ap dev` to start the development server for the project website to see how everything looks and works together.
1748

49+
Note that this server is **independent** from the development servers for your content — you need to run `ap doc` to start another server for the *Documentation tab* in your website to work.
1850

19-
## static/ Directory
51+
For convenience, you can run `ap dev --all` to start the development server for all content types and the project website at once, so that you don't need to run `ap doc`, `ap blog`, `ap tutorial`, `ap example`, or `ap guide` separately.
52+
53+
:::{tip} Standard Workflow
54+
The typical workflow is:
55+
- Run `ap doc` (and other content types) and start writing content
56+
- When finished, run `ap dev --all` to see what the final project website looks like
57+
:::
58+
59+
See [](project_website.md) for more details.
60+
61+
---
62+
## Build & Preview
63+
To build for production, run `ap build`.
64+
65+
run `ap preview` to preview the production build of the project website.
66+
67+
68+
---
69+
## Deploy
70+
A `deploy.yml` file is created in the `.github/workflows/` directory during initialization, which is a GitHub Actions workflow for deploying the project website to GitHub Pages.
71+
72+
By default, it will be triggered for deployment when you push any content changes to the `main` branch. If you don't want this, you can:
73+
- write content in a different branch, or
74+
- disable the workflow by commenting out the `on: push` section in the `deploy.yml` file
2075

2176

2277
:::{important} `afterpython` badge
23-
If you like `afterpython`, consider add this badge [![afterpython](https://afterpython.org/shield.svg)](https://afterpython.org) to your python project's `README.md` by:
78+
To support `afterpython`, consider adding this badge [![afterpython](https://afterpython.org/shield.svg)](https://afterpython.org) to your python project's `README.md` by writing:
79+
2480
`[![afterpython](https://afterpython.org/shield.svg)](https://afterpython.org)`
2581
:::
82+
83+
:::{seealso} Quick Guide to MyST
84+
:class: dropdown
85+
[MyST] is the document engine that powers `afterpython`. You may want to read the [Quick Guide to MyST](myst.md) to understand what you can do with it before writing content.
86+
:::

0 commit comments

Comments
 (0)