Jupyter notebootk Support (.ipynb format)
This article is written by jupyter (.ipynb format), the source document, please click on the upper right corner Edit this page to view
The jupyter-notebook plugin teedoc-plugin-jupyter-notebook-parser may not be used by default, it needs to be configured in the site_config file
"plugins": {
"teedoc-plugin-jupyter-notebook-parser":{
"from": "pypi",
"config": {
}
}
}
Markdown metadata header
Each md file can add a header, also called metadata (metadata in Chinese). The article information is set through these key values, and the format is yaml format. Of course, this file header is optional, or you can Do not write
---
title: markdown syntax
tags: teedoc, markdown, syntax
keywords: teedoc, markdown, syntax
desc: teedoc's markdown syntax introduction and examples
id: zh_readme
class: zh_readme
draft: false
# Start with a # sign to indicate a comment
---
title: the title of the article, can be used if there is no metadata header
# Article title
or
article title
===
keywords: Keywords, multiple keywords separated by commas,will be added to thehtmlheader, which is convenient for search engines to crawl, and will not be displayed on the page. Can also be written inyamllist format
keywords:
- teedoc
- markdown
- grammar
desc: The page description will be added to thehtmlheader and will not be displayed on the page, which is convenient for search engines to crawltags: article tags, which will be displayed on the page. Multiple tags are separated by commas,, or they can be written in the format ofyamllist, same askeywordsid: Theidof the page, which will be added to thehtmltag, such as<html id="zh_readme">...</html>, usually not needed, usually in a single page for a certain page It may be used when customizingcssalone, it will override the settings inconfig.jsonclass: pageclass, separated by commas,, can not be set, it will override the settings inconfig.json. For example, you can set thecssstyle of a specific page by setting this value. For specific supported styles, see theme plugin documentationlayout: The layout template used by the page. By default, the configuration in the theme plugin will be used. If you need to customize the layout of this page, you can set this parameter. The path is relative to the path set bylayout_root_dirinsite_config,layout_root_dirdefaults tolayout, so to uselayout/special_layout.htmljust fill inspecial_layout.html. For layout template syntax see layout documentationdate: the last update date, the format is2022-09-15- If not set: The last modification time of the file will be used by default. If it is a
gitrepository, it will automatically get the time of the last commit of the page fromgit. The system reads the last modified time (this is most likely inaccurate). In addition, ifupdateis filled with a value, the latest modification date inupdatewill be used - If you don't want to show the last modified date, disable it by setting the value to
false - If the
updatevalue is set, the value indatewill still be used first
- If not set: The last modification time of the file will be used by default. If it is a
update: update history, an update history table will be generated at the beginning of the article, format:
update:
- date: 2022-09-15
author: author1
version: 1.1.0
content: updated xxx
- date: 2022-08-05
author: author2
version: 1.0.0
content: updated xxx
update_open: display update history or not, defaulttrue, set tofalsewill collapse update history(supported by theme plugin)draft: Whether it is a draft, the default isfalse. If set totrue, this file will be ignored when generating the page.
Markdown syntax (this is the second level heading)
Markdown syntax can refer to Markdown syntax, jupyter's syntax parser come from jupyter official, so maybe some syntax not support in jupyter notebook that markdown file(.md) already supported.
Three-level heading
Four-level heading
Same as Markdown page, see Markdown Syntax page for details
Three-level heading 2
Four-level heading 2
Link
Relative path, index.html file: ../README.md, it will be automatically converted to index.html
Relative path,.html file: ./syntax_markdown.md, which will be converted into a link at the end of the document .html
Absolute path, http file: https://. . . /beginner.ipynb, the original link, will not be modified
Relative path,.html file: ./syntax_jupyter.ipynb, which will be converted into a link at the end of the document .html
Picture

Code
The following is the python code, which can contain the execution result. Use jupyter or jupyterlab or vscode locally to execute the code and save it
print("hello")
hello
print("world\nworld")
world
world
from PIL import Image
img = Image.open("../assets/images/logo.png")
from matplotlib import pyplot as plt
print("image")
plt.figure()
plt.imshow(img)
plt.show()
print("image")
image
image
math
Supports tex and Latex syntax, and MathML tag
Two ways of writing,
- One is inline inline, wrap the equation with
$symbol, for example
The mass-energy equation $E=mc^2$ is familiar to everyone, right?
Effect: Mass-energy equation $E=mc^2$ everyone is familiar with
- Another type, block equation, wrap the equation with
$$, such as
$$
E=mc^2
$$
Effect: $$ E=mc^2 $$
Other examples: common:
When $a \ne 0$, there are two solutions to $ax^2 + bx + c = 0$ and they are
$$
x = {-b \pm \sqrt{b^2-4ac} \over 2a}.
$$
When $a \ne 0$, there are two solutions to $ax^2 + bx + c = 0$ and they are $$ x = {-b \pm \sqrt{b^2-4ac} \over 2a}. $$