Skip to content

Commit

Permalink
docs: update usage information
Browse files Browse the repository at this point in the history
  • Loading branch information
agoose77 committed Aug 21, 2024
1 parent 3cab6bf commit 2eccdb0
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ in order to be able to use the `myst` builder, e.g.
sphinx-build -b myst . <BUILDDIR>
```

The generated `.myst.json` files in `<BUILDDIR>/content` can be added to your TOC e.g. using a `pattern` entry, e.g.
The generated `.myst.json` files in `<BUILDDIR>` can be added to your TOC e.g. using a `pattern` entry, e.g.

```yaml
project:
Expand All @@ -27,7 +27,13 @@ project:

```

You can also serve the `myst.xref.json` from your Sphinx deployment to enable MyST xrefs.
You can also build an xref distribution for your site, which allows MyST projects to richly cross-reference into your documentation.

Running
```shell
sphinx-build -b myst-xref . <BUILDDIR>
```
will generate a `myst.xref.json` in `<BUILDDIR>`. The contents of `<BUILDDIR>` should be added to your site's root directory.

> [!WARNING]
> This extension is a literal work-in-progress; some things don't work.
Expand Down
4 changes: 2 additions & 2 deletions docs/extend-sphinx.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ The Sphinx `conf.py` for your project should include `sphinx-ext-mystmd`. If you
extensions = [
"sphinx_ext_mystmd"
]
html_extra_path = ["./myst-build"]
html_extra_path = ["./myst-xrefs"]
:::

## Build the MyST Metadata

```shell
sphinx-build -b myst . ./myst-build
sphinx-build -b myst-xref . ./myst-xrefs
```

## Build the HTML Deployment
Expand Down
4 changes: 2 additions & 2 deletions docs/include-sphinx.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ extensions = [
## Build the Sphinx Project

```shell
sphinx-build -b myst sphinx myst-build
sphinx-build -b myst sphinx myst-asts
```

## Configure the MyST Project
Expand All @@ -31,7 +31,7 @@ version: 1
project:
toc:
- file: index.md
- pattern: myst-build/content/**.myst.json
- pattern: myst-asts/content/**.myst.json
site:
template: book-theme
:::
Expand Down

0 comments on commit 2eccdb0

Please sign in to comment.