Skip to content

References for MkDocs

Buttons

Default Button

Subscribe to our newsletter

Primary Button

Subscribe to our newsletter

Icon Button

Send

Content Tabs

  • Sed sagittis eleifend rutrum
  • Donec vitae suscipit est
  • Nulla tempor lobortis orci
  1. Sed sagittis eleifend rutrum
  2. Donec vitae suscipit est
  3. Nulla tempor lobortis orci

Admonitions

Note

Note

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa.

Collapsible blocks

Note

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla et euismod nulla. Curabitur feugiat, tortor non consequat finibus, justo purus auctor massa, nec semper lorem quam in massa.

Note

Adding a + after the ??? token renders the block expanded.

Supported admonitions

  • note
  • warning
  • tip
  • abstract
  • info
  • success
  • question
  • failure
  • danger
  • bug
  • example
  • quote

Code Blocks

Python Block

import torch 

Python Block with Title

test.py
import numpy as np

Python Block with Line Numbers

1
2
3
4
5
import torch 
import numpy as np

def to_be_tensor(np_arr):
    return torch.from_numpy(np_arr)

Python Block with Highlighted Lines

import torch 
import numpy as np

def to_be_tensor(np_arr):
    return torch.from_numpy(np_arr)

Adding Annotations & Stripping Line Noise

theme:
  features:
    - content.code.annotate # (1)

Following line strips line noise from the code block
# (2)!
  1. 🙋‍♂️ I'm a code annotation! I can contain code, formatted text, images, ... basically anything that can be written in Markdown.
  2. Look ma, less line noise!

Embedding External Code

Code block with external content
site_name: コリンのスペース
site_description: Colin's Space
site_url: 'https://csl122.com/'
site_author: Shiliang Chen
# repo_url: 'https://github.com/csl122/mkdocs'
# edit_uri: edit/main/docs/
theme:
  name: material
  favicon: images/avt.png
  logo: images/avt.png
  features:
    - navigation.tabs
    - navigation.top
    - navigation.sections
    - navigation.tracking
    - navigation.indexes
    - navigation.expand
    # - toc.integrate
    - toc.follow
    - search.suggest
    - search.highlight
    - content.tabs.link
    - content.code.annotation
    - content.code.copy
    - content.code.annotate
  language: en
  palette:
    - scheme: default
      toggle:
        icon: material/brightness-7
        name: Switch to dark mode
      primary: white
      accent: cyan
    - scheme: slate 
      toggle:
        icon: material/brightness-4
        name: Switch to light mode    
      primary: black
      accent: cyan
  icon:
    # logo: material/apple-keyboard-command
    repo: fontawesome/brands/github
    admonition:
      note: octicons/tag-16
      abstract: octicons/checklist-16
      info: octicons/info-16
      tip: octicons/squirrel-16
      success: octicons/check-16
      question: octicons/question-16
      warning: octicons/alert-16
      failure: octicons/x-circle-16
      danger: octicons/zap-16
      bug: octicons/bug-16
      example: octicons/beaker-16
      quote: octicons/quote-16

nav:
  - Home:
      - index.md
      - Bio: home/bio.md
      # - 术语: GettingStarted/term.md
      # - 声明: GettingStarted/state.md
      # - 贡献指南: GettingStarted/contributing.md
  - AIGC:
      - aigc/index.md
      - Stable Diffusion: aigc/Stable Diffusion.md
  - NLP:
      - nlp/index.md
      - Natural Language Processing: nlp/Natural Language Processing.md
  - ML/DL:
      - ml/index.md
      - Deep Learning: ml/Deep Learning.md
      - ML for Imaging: ml/Machine Learning for Imaging.md
      - NumPy: ml/numpy.md
      - PyTorch: ml/PyTorch.md
  - Project:
      - project/index.md
  - Mac: 
      - mac/index.md
      - Mac: mac/Mac.md
  - Linux: 
      - linux/index.md
      - Git: linux/git.md
      - Vim: linux/Vim.md
      - AstroNvim: linux/AstroNvim.md
      - Starship: linux/Starship.md
      - Tmux: linux/Tmux.md
  - Networking: 
      - networking/index.md
      - Nginx: networking/Nginx.md
      - Nginx Proxy Manager: networking/Nginx Proxy Manager.md
  - Game: 
      - game/index.md
  - Miscellaneous:
      - misc/index.md
      - References: misc/mkdocs.md
      - 23W26: misc/23W26.md

# plugins:
#   - social

extra:
  homepage: https://csl122.com
  social:
    - icon: fontawesome/brands/github-alt
      link: https://github.com/csl122
    # - icon: fontawesome/brands/twitter
    #   link: https://twitter.com/csl122
    - icon: fontawesome/brands/linkedin
      link: https://www.linkedin.com/in/csl122/
    - icon: fontawesome/solid/paper-plane
      link: mailto:[email protected]

markdown_extensions:
  - pymdownx.highlight:
      anchor_linenums: true
  - pymdownx.inlinehilite
  - pymdownx.snippets
  - admonition
  - pymdownx.arithmatex:
      generic: true
  - footnotes
  - pymdownx.details
  - pymdownx.superfences
  - pymdownx.mark
  - attr_list
  - pymdownx.emoji:
      emoji_index: !!python/name:materialx.emoji.twemoji
      emoji_generator: !!python/name:materialx.emoji.to_svg
  - pymdownx.tabbed:
      alternate_style: true
copyright: |
  &copy; 2023 <a href="https://github.com/csl122"  target="_blank" rel="noopener">Shiliang Chen</a>

Footnote

Lorem ipsum1 dolor sit amet, consectetur adipiscing elit.2


  1. Lorem ipsum dolor sit amet, consectetur adipiscing elit. 

  2. Lorem ipsum dolor sit amet, consectetur adipiscing elit.