diff --git a/README.md b/README.md index f5dd98131..3353ffc18 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,6 @@ # Jupyter Book +[![Jupyter Book Badge](docs/images/badge.svg)](https://jupyterbook.org) [![CircleCI](https://circleci.com/gh/executablebooks/jupyter-book.svg?style=svg)](https://circleci.com/gh/executablebooks/jupyter-book) [![codecov](https://codecov.io/gh/executablebooks/jupyter-book/branch/master/graph/badge.svg)](https://codecov.io/gh/executablebooks/jupyter-book) [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2561065.svg)](https://doi.org/10.5281/zenodo.2561065) diff --git a/docs/_config.yml b/docs/_config.yml index 16a1c1d4b..b96926121 100644 --- a/docs/_config.yml +++ b/docs/_config.yml @@ -107,6 +107,9 @@ sphinx: content-types/jupytext.md: file-types/jupytext.Rmd content-types/restructuredtext.md: file-types/restructuredtext.md language: en + html_extra_path: + - images/badge.svg + extra_extensions: - sphinx_click.ext diff --git a/docs/_toc.yml b/docs/_toc.yml index df0fd0b44..63172640f 100644 --- a/docs/_toc.yml +++ b/docs/_toc.yml @@ -61,6 +61,7 @@ parts: sections: - file: interactive/comments/hypothesis - file: interactive/comments/utterances + - file: web/badge - file: publish/web sections: - file: publish/gh-pages diff --git a/docs/images/badge.svg b/docs/images/badge.svg new file mode 100644 index 000000000..6325d4d0f --- /dev/null +++ b/docs/images/badge.svg @@ -0,0 +1 @@ +jupyter: bookjupyterbook diff --git a/docs/intro.md b/docs/intro.md index 93e97b3a6..efd7e019f 100644 --- a/docs/intro.md +++ b/docs/intro.md @@ -2,6 +2,7 @@ ```{only} html [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2561065.svg)](https://doi.org/10.5281/zenodo.2561065) +[![Jupyter Book Badge](images/badge.svg)](https://jupyterbook.org) ``` Jupyter Book is an open source project for building beautiful, diff --git a/docs/web/badge.md b/docs/web/badge.md new file mode 100644 index 000000000..b4e671cff --- /dev/null +++ b/docs/web/badge.md @@ -0,0 +1,23 @@ +# Generate a badge for your book + +You can generate a badge like this so that others know your repository and content files are built for Jupyter Book. +Here's what the badge looks like (only visible on HTML): + +:::{only} html +[![Jupyter Book Badge](../images/badge.svg)](https://jupyterbook.org) +::: + +To generate the badge, copy the code block below, and replace `` with the URL of your choice. + +``` +[![Jupyter Book Badge](https://jupyterbook.org/badge.svg)]() +``` + +Additionally, you can generate a badge directly from [shields.io](https://shields.io). +Here's the URL to auto-generate the badge above, using a base64-encoded version of the Jupyter Book logo. +Feel free to modify this as you wish! + +:::{admonition} Shields.io badge link +:class: seealso +https://img.shields.io/badge/jupyter-book-orange?logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAZCAMAAAAVHr4VAAAAXVBMVEX////v7+/zdybv7+/zdybv7+/zdybv7+/zdybv7+/zdybv7+/zdybv7+/zdybv7+/zdybv7+/zdybv7+/v7+/zdybv7+/zdybv7+/v7+/zdybv7+/zdybv7+/zdyaSmqV2AAAAHXRSTlMAEBAgIDAwQEBQUGBgcHCAgJCQoLCwwMDQ4ODw8MDkUIUAAADJSURBVHjaddAFkgNBCAXQP+7uAvc/5tLFVseYF8crUB0560r/5gwvjYYm8gq8QJoyIJNwlnUH0WEnART6YSezV6c5tjOTaoKdfGXtnclFlEBEXVd8JzG4pa/LDql9Jff/ZCC/h2zSqF5bzf4vqkgNwEzeClUd8uMadLE6OnhBFsES5niQh2BOYUqZsfGdmrmbN+TMvPROHUOkde8sEs6Bnr0tDDf2Roj6fmVfubuGyttejCeLc+xFm+NLuLnJeFAyl3gS932MF/wBoukfUcwI05kAAAAASUVORK5CYII= +:::