Skip to content

Commit

Permalink
📝 Initialize Jupyter Book
Browse files Browse the repository at this point in the history
Starting with a minimally modified Jupyter Book initialized with `jupyter-book create book/`. Changed the `_config.yml` to use a proper title and the GeoSmart logo. Included a Binder launch button and a footer with CC-BY-4.0 license. Also added a JupyterBook badge to the main README.md.

Deleted the sample notebooks.ipynb and markdown-notebooks.md files, and excluded the book/requirements.txt (dependencies will be installed from environment.yml). Updated the sample citation the the 2022 ICESat-2 Hackweek Jupyter Book website DOI.
  • Loading branch information
weiji14 committed Nov 3, 2022
1 parent 854101b commit d2f90b2
Show file tree
Hide file tree
Showing 9 changed files with 182 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Jupyter Book
/book/_build/

# Jupyter Notebook
.ipynb_checkpoints/
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# DeepIceDrainPipe

[![Jupyter Book Badge](https://jupyterbook.org/badge.svg)](https://geo-smart.github.io/deepicedrainpipe)

Machine Learning data pipeline and Jupyter Book for the
[DeepIceDrain](https://github.com/weiji14/deepicedrain) project.

Expand Down
46 changes: 46 additions & 0 deletions book/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Book settings
# Learn more at https://jupyterbook.org/customize/config.html

title: DeepIceDrain
author: Wei Ji Leong, Jessica Scheick, Wilson Sauthoff
logo: logo.svg

# Force re-execution of notebooks on each build.
# See https://jupyterbook.org/content/execute.html
execute:
execute_notebooks: force

# Define the name of the latex output file for PDF builds
latex:
latex_documents:
targetname: deepicedrain.tex

# Add a bibtex file so that we can create citations
bibtex_bibfiles:
- references.bib

# Launch button settings
launch_buttons:
notebook_interface: jupyterlab
binderhub_url: https://mybinder.org

# Information about where the book exists on the web
repository:
url: https://github.com/geo-smart/deepicedrainpipe # Online location of your book
path_to_book: book # Optional path to your book, relative to the repository root
branch: main # Which branch of the repository should be used when creating links (optional)

# Add GitHub buttons to your book
# See https://jupyterbook.org/customize/config.html#add-a-link-to-your-repository
html:
use_edit_page_button: true
use_issues_button: true
use_repository_button: true
extra_footer: |
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by/4.0/88x31.png" /></a><br />
This content is licensed under a
<a rel="license" href="http://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</a>.
sphinx:
config:
html_show_copyright: false
7 changes: 7 additions & 0 deletions book/_toc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Table of contents
# Learn more at https://jupyterbook.org/en/stable/structure/toc.html

format: jb-book
root: intro
chapters:
- file: markdown
11 changes: 11 additions & 0 deletions book/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Welcome to your Jupyter Book

This is a small sample book to give you a feel for how book content is
structured.
It shows off a few of the major file types, as well as some sample content.
It does not go in-depth into any particular topic - check out [the Jupyter Book documentation](https://jupyterbook.org) for more information.

Check out the content pages bundled with this sample book to see more.

```{tableofcontents}
```
19 changes: 19 additions & 0 deletions book/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
55 changes: 55 additions & 0 deletions book/markdown.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Markdown Files

Whether you write your book's content in Jupyter Notebooks (`.ipynb`) or
in regular markdown files (`.md`), you'll write in the same flavor of markdown
called **MyST Markdown**.
This is a simple file to help you get started and show off some syntax.

## What is MyST?

MyST stands for "Markedly Structured Text". It
is a slight variation on a flavor of markdown called "CommonMark" markdown,
with small syntax extensions to allow you to write **roles** and **directives**
in the Sphinx ecosystem.

For more about MyST, see [the MyST Markdown Overview](https://jupyterbook.org/content/myst.html).

## Sample Roles and Directives

Roles and directives are two of the most powerful tools in Jupyter Book. They
are kind of like functions, but written in a markup language. They both
serve a similar purpose, but **roles are written in one line**, whereas
**directives span many lines**. They both accept different kinds of inputs,
and what they do with those inputs depends on the specific role or directive
that is being called.

Here is a "note" directive:

```{note}
Here is a note
```

It will be rendered in a special box when you build your book.

Here is an inline directive to refer to a document: {doc}`markdown`.


## Citations

You can also cite references that are stored in a `bibtex` file. For example,
the following syntax: `` {cite}`2022_IS2_HW_tutorials` `` will render like
this: {cite}`2022_IS2_HW_tutorials`.

Moreover, you can insert a bibliography into your page with this syntax:
The `{bibliography}` directive must be used for all the `{cite}` roles to
render properly.
For example, if the references for your book are stored in `references.bib`,
then the bibliography is inserted with:

```{bibliography}
```

## Learn more

This is just a simple starter to get you started.
You can learn a lot more at [jupyterbook.org](https://jupyterbook.org).
Loading

0 comments on commit d2f90b2

Please sign in to comment.