Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sebastianschmidl/gh-pages-test
https://github.com/sebastianschmidl/gh-pages-test
Last synced: 5 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/sebastianschmidl/gh-pages-test
- Owner: SebastianSchmidl
- Created: 2021-12-10T13:07:38.000Z (about 3 years ago)
- Default Branch: gh-pages
- Last Pushed: 2021-12-17T08:49:30.000Z (about 3 years ago)
- Last Synced: 2024-11-19T12:15:30.493Z (2 months ago)
- Language: HTML
- Size: 4.26 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Home Page
{:.no_toc}Test home page.
Go to [Publication Test](./Publication-Test.html) to look at the bare evaluation results or to [Test 2](./notebooks/Test2.html) for a better UX.## Content
- table of contents
{:toc}## How-To
Steps to convert a Jupyter Notebook to a markdown file compatible with GH-Pages (Jekyll & Liquid).
1. Prepare your notebook for export:
In the first code cell inject JavaScript to load `require.js`.
This is needed for Plotly to load correctly.
You can use the following code:~~~python
from IPython.display import display, HTML
# load require.js
display(HTML(''))
~~~2. Use `nbconvert` to convert your notebook to markdown:
~~~bash
jupyter nbconvert --no-prompt --no-input --to markdown notebooks/.ipynb
~~~This command will also remove all prompts and input cells for a cleaner output.
3. Clean and sanitize the markdown file:
You have to remove all appearences of {{ '`{{`' }}, `}}`, {{ '`{%`' }}, and `%}` in the original markdown file, because they are
interpreted by Liquid (the used templating engine).
You can use the script `sanitize.sh` for this step.4. Add the front matter to the page to specify its metadata.
This includes title, description, its permalink, and other details.
Example:~~~yaml
---
title: Test notebook
description: This page showcases a html-rendered jupyter notebook
permalink: /test-notebook/
---
~~~## Math Test
Here, we just test out the math engine of Jekyll and kramdown:
The default LaTeX-environments are not supported: $\lim_{n \to \infty}\Sigma^n_{i=1} \frac{i+2}{4n}$.
However, you can display a math-block with `$$`:
$$\lim_{n \to \infty}\Sigma^n_{i=1} \frac{i+2}{4n}$$
or with `\\[`:
\\[\lim_{n \to \infty}\Sigma^n_{i=1} \frac{i+2}{4n}\\].
Or you can use inline math with `\\(`: \\(\lim_{n \to \infty}\Sigma^n_{i=1} \frac{i+2}{4n}\\).
Try also to use inline math with `\$$`: \$$3+5\epsilon \leq \infty$$
[Here](https://kramdown.gettalong.org/syntax.html) is a reference to the kramdown-Syntax that is used by Jekyll to transform this document to HTML[^footnote].
## Footnotes
[^footnote]: Footnote test.