Skip to content

Commit 0227b8d

Browse files
committed
update docs
1 parent 1d0f0f5 commit 0227b8d

File tree

2 files changed

+36
-41
lines changed

2 files changed

+36
-41
lines changed

docs/get-started/basic-content.qmd

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,20 @@ jupyter:
77
name: python3
88
---
99

10-
Individual content entries (e.g. a function to be documented) can also be customized.
10+
Individual content entries (e.g. a function to be documented) can be customized.
1111
For example, if you are documenting a Python class, you may want to include or exclude
1212
documentation on specific methods on that class.
1313

14-
Specify content options by setting `name: <content name>`, along with any additional options.
14+
Specify content options by setting `name: <content name>` followed by any additional options.
1515

16-
For example, below is a piece of content, MdRenderer, specified without options.
16+
For example, below is a single content element, `MdRenderer`, without additional options.
1717

1818
```yaml
1919
contents:
2020
- MdRenderer
2121
```
2222
23-
We set it to only document its render method, by setting `name: MdRenderer` followed by the `members` option.
23+
Instead of documenting the entire `MdRenderer` class, we can only document the `MdRenderer.render` method by setting `name: MdRenderer` followed by the `members` option:
2424

2525
```yaml
2626
contents:
@@ -36,10 +36,10 @@ In the following sections, we'll discuss different options for configuring conte
3636

3737
Finding Python objects to document involves two pieces of configuration:
3838

39-
* the package name.
40-
* a list of objects for content.
39+
1. the package name.
40+
2. a list of objects for content.
4141

42-
Note that quartodoc can look up anything---whether functions, modules, classes, attributes, or methods.
42+
quartodoc can look up a wide variety of objects, including functions, modules, classes, attributes, and methods:
4343

4444
```yaml
4545
quartodoc:
@@ -55,13 +55,13 @@ quartodoc:
5555
- renderers # module: quartodoc.renderers
5656
```
5757

58-
The functions listed in `contents` are assumed to be imported from the package.
58+
The functions listed in `contents` are those that are available for import from the package (`quartodoc` in this instance).
5959

6060
## Module and class members
6161

62-
Documentation for modules and classes can automatically include their members (e.g. class methods and attributes; everything defined inside a module).
62+
Documentation for classes and modules can automatically include their members (e.g. class methods and attributes or everything defined inside a module, respectively).
6363

64-
By default, all attributes and functions (including methods on a class) are documented by embedding them inside the module or class documentation.
64+
By default, all attributes and functions (including methods on a class) are presented in the `embedded` style, which means their documentation is located inside their respective module's or class's documentation.
6565

6666
There are four styles for presenting child members:
6767

@@ -82,7 +82,7 @@ res = extract_type(DocstringSectionAttributes, choices.docstring.parsed)[0]
8282
print(renderer.render(res))
8383
```
8484

85-
You can specify a style by setting the `children` option in the config:
85+
You can specify a style for displaying members by setting the `children` option in the config:
8686

8787
```yaml
8888
quartodoc:
@@ -102,12 +102,11 @@ quartodoc:
102102

103103
## Setting default options
104104

105-
The section above showed how you can set options like `members:` and `children:` on content.
106-
When specifying API documentation, you may need to specify the same options across multiple pieces of content.
105+
The section above showed how you can set options like `members:` (which is a list of the items you want to show) and `children:` (the style for presenting `members`) on content.
107106

108-
Use the `options:` field in a section to specify options to apply across all content in that section.
107+
However, you may desire to set the same options across multiple pieces of content. In this case, you can set default options for a section that applies to all content in that section. You can use the `options:` field to accomplish this.
109108

110-
For example, the config blocks below show how to document multiple classes without their members.
109+
For example, the config below shows how to document multiple classes _without_ any child members. On the left, you can see the config without setting the default option, and on the right, you can see the config with the default option set.
111110

112111
:::::: {.columns}
113112
::: {.column}
@@ -151,12 +150,11 @@ quartodoc:
151150
:::
152151
::::::
153152

154-
Note that the **with options** block sets `members: []` inside `options`.
155-
This sets `members: []` as the default for each piece of content.
153+
By setting `members: []` in the options block, we are telling quartodoc to not include any members for each piece of content.
156154

157155
### Reusing options
158156

159-
Options can be given a name, and re-used in multiple sections:
157+
Options can be given a name and re-used in multiple sections:
160158

161159
```yaml
162160
- title: Some section

docs/get-started/overview.qmd

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -10,41 +10,38 @@ jupyter:
1010
---
1111

1212

13-
quartodoc lets you quickly generate python package documentation,
14-
using markdown and [quarto](https://quarto.org).
15-
It is designed as an alternative to Sphinx.
16-
17-
Check out the screencast below for a full walkthrough of creating a documentation site,
18-
or read on for instructions on installation and use.
19-
20-
<br>
13+
**quartodoc** lets you quickly generate Python package API reference documentation using Markdown and [Quarto](https://quarto.org).
14+
quartodoc is designed as an alternative to [Sphinx](https://www.sphinx-doc.org/en/master/).
2115

16+
Check out the below screencast for a walkthrough of creating a documentation site, or read on for instructions.
2217

2318
<div style="position: relative; padding-bottom: 64.5933014354067%; height: 0;"><iframe src="https://www.loom.com/embed/fb4eb736848e470b8409ba46b514e2ed?sid=31db7652-43c6-4474-bab3-19dea2170775" frameborder="0" webkitallowfullscreen mozallowfullscreen allowfullscreen style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe></div>
2419

25-
<br>
26-
<br>
2720

2821
## Installation
2922

3023
```bash
3124
python -m pip install quartodoc
25+
```
26+
or from GitHub
3227

33-
# or from github
28+
```bash
3429
python -m pip install git+https://github.com/machow/quartodoc.git
3530
```
3631

37-
:::{.callout-note}
38-
In order to install quarto, see the quarto [get started page](https://quarto.org/docs/get-started/).
32+
:::{.callout-important}
33+
34+
### Install Quarto
35+
36+
If you haven't already, you'll need to [install Quarto](https://quarto.org/docs/get-started/) before you can use quartodoc.
3937
:::
4038

4139

4240
## Basic use
4341

44-
Getting started with quartodoc takes two steps: configuring a quarto website,
45-
and generating documentation pages for your library.
42+
Getting started with quartodoc takes two steps: configuring quartodoc, then generating documentation pages for your library.
4643

47-
First, create a `_quarto.yml` file with the following:
44+
You can configure quartodoc alongside the rest of your Quarto site in the [`_quarto.yml`](https://quarto.org/docs/projects/quarto-projects.html) file you are already using for Quarto. To [configure quartodoc](basic-docs.qmd#site-configuration), you need to add a `quartodoc` section to the top level your `_quarto.yml` file. Below is a minimal example of a configuration that documents the `quartodoc` package:
4845

4946
```yaml
5047
project:
@@ -56,7 +53,7 @@ metadata-files:
5653

5754

5855
quartodoc:
59-
# the name used to import the package
56+
# the name used to import the package you want to create reference docs for
6057
package: quartodoc
6158

6259
# write sidebar data to this file
@@ -72,13 +69,13 @@ quartodoc:
7269
- preview
7370
```
7471
75-
Next, run this command to generate your API pages:
72+
Now that you have configured quartodoc, you can generate the reference API docs with the following command:
7673
7774
```bash
7875
quartodoc build
7976
```
8077

81-
This should create a `reference/` directory with an `index.qmd` and documentation
78+
This will create a `reference/` directory with an `index.qmd` and documentation
8279
pages for listed functions, like `get_object` and `preview`.
8380

8481
Finally, preview your website with quarto:
@@ -105,12 +102,12 @@ quarto preview
105102

106103
## Looking up objects
107104

108-
Finding python objects to document involves two pieces of configuration:
105+
Generating API reference docs for Python objects involves two pieces of configuration:
109106

110-
* the package name.
111-
* a list of objects for content.
107+
1. the package name.
108+
2. a list of objects for content.
112109

113-
Note that quartodoc can look up anything---whether functions, modules, classes, attributes, or methods.
110+
quartodoc can look up a wide variety of objects, including functions, modules, classes, attributes, and methods:
114111

115112
```yaml
116113
quartodoc:

0 commit comments

Comments
 (0)