Skip to content

Commit

Permalink
📖 Remove RTD and add Netlify (#1124)
Browse files Browse the repository at this point in the history
  • Loading branch information
choldgraf authored Apr 17, 2024
1 parent b7a10dd commit 5b99b82
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 29 deletions.
16 changes: 0 additions & 16 deletions .readthedocs.yaml

This file was deleted.

11 changes: 11 additions & 0 deletions docs/contribute-docs.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,14 @@ Below is a brief description for how modifications in a theme are released for p
2. **[dev facing]** if there were changes in `packages/*` we release the `@myst-theme/*` packages (changesets based ci step)
3. **[dev facing]** we then run `make deploy-book` and `make deploy-article` which builds and bundles each theme, making commits to the https://github.com/myst-templates/book-theme and https://github.com/myst-templates/article-theme repos.
4. **[user facing]** at that point those latest bundle commits will be what is pulled by `mystmd` clients - people who already have those downloaded need to `myst clean --all` (as we don't yet auto bump based on version changes, see [#854](https://github.com/executablebooks/mystmd/issues/854) for updates).

## Deploy previews for pull requests

We use [the Netlify service](https://netlify.app) to generate deploy previews of the `mystmd` documentation for all pull requests.
These build only the `mystmd` guide (hosted at https://mystmd.org/guide), not the entire mystmd.org website.
They're just used for convenience and review purposes.

Configuration for our Netlify build exists in the [`netlify.toml` configuration file](https://docs.netlify.com/configure-builds/file-based-configuration/) in the root of the repository.

Any team members can have `Developer` access to our shared Netlify account, and Steering Council members can have `Owner` access.
If you'd like access, please ask a maintainer.
10 changes: 0 additions & 10 deletions docs/environment.yml

This file was deleted.

25 changes: 22 additions & 3 deletions docs/notebooks-with-markdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,20 @@ For example, the following directive inserts a code cell into the page, and will

````markdown
```{code-cell} python
print("hi")
hello = "hello"
there = "there"
phrase = f"{hello}, {there}!"
print(phrase)
```
````

```{code-cell} python
hello = "hello"
there = "there"
phrase = f"{hello}, {there}!"
print(phrase)
```

(myst:inline-expressions)=

## Inline expressions with the `{eval}` role
Expand All @@ -50,15 +60,24 @@ This allows you to quickly insert its output in a way that flows with the text a
For example, the following MyST Markdown would re-use the variable defined above.

```markdown
The value of `hello` is {eval}`there`.
The phrase is: {eval}`phrase`.
```

This results in the following:

> The phrase is: {eval}`phrase`.
You can also modify the expression at the time of computation, for example:

```markdown
The value of `hello` is {eval}`there + ", wow that's nifty!"`.
The phrase manually computed is: {eval}`f"{hello}, {there} everybody!"`
```

This results in the following:

> The phrase manually computed is: {eval}`f"{hello}, {there} everybody!"`
:::{seealso} Also works in JupyterLab
See [](./quickstart-jupyter-lab-myst.md) for how these eval statements also work in JupyterLab.
![](#fig:eval-array)
:::
7 changes: 7 additions & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
altair
ipykernel
jupyter
pandas
matplotlib
numpy
vega_datasets
10 changes: 10 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[build]
command = """
pip install -r docs/requirements.txt;
npm run build;
npm run --workspace packages/mystmd link;
cd docs;
myst build --html --execute
echo "User-agent: *\nDisallow: /" > _build/html/robots.txt
"""
publish = "/docs/_build/html/"

0 comments on commit 5b99b82

Please sign in to comment.