Skip to content

Commit

Permalink
Add a link to Binder
Browse files Browse the repository at this point in the history
  • Loading branch information
mwouts committed Mar 18, 2024
1 parent 7d8f89e commit 168f97f
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 4 deletions.
8 changes: 6 additions & 2 deletions binder/postBuild
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ pip install .
mkdir -p ${HOME}/.jupyter/labconfig
cp binder/labconfig/* ${HOME}/.jupyter/labconfig

# Update the kernel on the documentation notebooks
jupytext docs/*.md --set-kernel -
# Install a kernel called itables
python -m ipykernel install --name itables --user

# Use that kernel for the documentation notebooks
jupytext docs/*.md --set-kernel itables
jupytext README.md --set-kernel itables
11 changes: 11 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,14 @@ execute:
sphinx:
config:
html_extra_path: ['quarto']
repository:
url: https://github.com/mwouts/itables
path_to_book: docs
branch: main
html:
use_edit_page_button: true
use_repository_button: true
use_issues_button: true
launch_buttons:
notebook_interface: "jupyterlab"
binderhub_url: "https://mybinder.org"
4 changes: 4 additions & 0 deletions docs/advanced_parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ import itables.options as opt
opt.lengthMenu = [5, 10, 20, 50, 100, 200, 500]
```

```{tip}
The rocket icon at the top of the page will let you run this notebook in Binder!
```

## Caption

You can set additional `tags` on the table like e.g. a [caption](https://datatables.net/blog/2014-11-07):
Expand Down
2 changes: 1 addition & 1 deletion docs/custom_css.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ If you wish you can also set a value for `columnDefs` permanently in `itables.op

## Cell alignment

You can use the datatables.net [cell classes](https://datatables.net/manual/styling/classes#Cell-classes) like `dt-left`, `dt-center`, `dt-right` etc. to set the cell alignment. Specify it for one table by using the `columnDefs` argument of `show`
You can use the DataTables [cell classes](https://datatables.net/manual/styling/classes#Cell-classes) like `dt-left`, `dt-center`, `dt-right` etc. to set the cell alignment. Specify it for one table by using the `columnDefs` argument of `show`

```{code-cell}
show(df, columnDefs=[{"className": "dt-center", "targets": "_all"}])
Expand Down
6 changes: 5 additions & 1 deletion docs/extensions.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ wide_df = pd.DataFrame(
)
```

```{tip}
The rocket icon at the top of the page will let you run this notebook in Binder!
```

## Buttons

The DataTables [buttons](https://datatables.net/extensions/buttons/) let you copy the table data, or export it as CSV or Excel files.
Expand Down Expand Up @@ -99,7 +103,7 @@ show(
```

```{warning}
The PDF button is not included in ITables's DataTable bundle. This is because the required PDF libraries
The PDF button is not included in ITables' DataTable bundle. This is because the required PDF libraries
have a large footprint on the bundle size. Still, you can add it to your custom bundle, see the next chapter.
```

Expand Down

0 comments on commit 168f97f

Please sign in to comment.