Welcome to MkDocs
For full documentation visit mkdocs.org.
Commands
mkdocs new [dir-name]
- Create a new project.mkdocs serve
- Start the live-reloading docs server.mkdocs build
- Build the documentation site.mkdocs -h
- Print help message and exit.
Project layout
mkdocs.yml # The configuration file.
docs/
index.md # The documentation homepage.
... # Other markdown pages, images and other files.
Code blocks
코드 블록
코드 블록
C
C++
c++ example | |
---|---|
Assembly (x86)
section .data
msg db 'Hello, World!', 0
section .text
global _start
_start:
mov eax, 4
mov ebx, 1
mov ecx, msg
mov edx, 13
int 0x80
mov eax, 1
mov ebx, 0
int 0x80
Terminal/Shell
# Create a new directory
mkdir my_project
cd my_project
# List files with details
ls -la
# Run a command with sudo
sudo apt update && sudo apt upgrade
Python
def fibonacci(n):
if n <= 1:
return n
return fibonacci(n-1) + fibonacci(n-2)
print(f"Fibonacci(10): {fibonacci(10)}")
JavaScript
function greet(name) {
return `Hello, ${name}!`;
}
const result = greet("MkDocs");
console.log(result);