diff --git a/binder/postBuild b/binder/postBuild index 20ac82af..334b7de6 100644 --- a/binder/postBuild +++ b/binder/postBuild @@ -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 diff --git a/docs/_config.yml b/docs/_config.yml index 26d5c62d..add33a7a 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -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" diff --git a/docs/advanced_parameters.md b/docs/advanced_parameters.md index 1c26e512..6d3ca2fb 100644 --- a/docs/advanced_parameters.md +++ b/docs/advanced_parameters.md @@ -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): diff --git a/docs/custom_css.md b/docs/custom_css.md index 7878dd25..e39f2bdc 100644 --- a/docs/custom_css.md +++ b/docs/custom_css.md @@ -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"}]) diff --git a/docs/extensions.md b/docs/extensions.md index 786a5701..38337939 100644 --- a/docs/extensions.md +++ b/docs/extensions.md @@ -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. @@ -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. ```