Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃摎 DOCS: Add web badge #1380

Merged
merged 2 commits into from
Jul 20, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# <img src="https://raw.githubusercontent.com/executablebooks/jupyter-book/master/docs/images/logo-square.svg" width=40 /> 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)
Expand Down
3 changes: 3 additions & 0 deletions docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ parts:
sections:
- file: interactive/comments/hypothesis
- file: interactive/comments/utterances
- file: web/badge
- file: advanced/html

- file: advanced/index
Expand Down
1 change: 1 addition & 0 deletions docs/images/badge.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
23 changes: 23 additions & 0 deletions docs/web/badge.md
Original file line number Diff line number Diff line change
@@ -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 `<YOUR URL HERE>` with the URL of your choice.

```
[![Jupyter Book Badge](https://jupyterbook.org/badge.svg)](<YOUR URL HERE>)
```

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=
:::