account_circle
date_range
Advance
Note Div#
Example:
1 2 3 4 | !!! note "Phasellus posuere in sem ut cursus"
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.
|
Result:
Phasellus posuere in sem ut cursus
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.
Type:
| note | Success | Warning |
|---|---|---|
| note | success | warning |
| seealso | check | caution |
| abstract | done | attention |
| info | question | danger |
| todo | help | bug |
CodeHilite#
Example:
1 2 3 | ``` python import tensorflow as tf ``` |
Result:
1 | import tensorflow as tf |
Highlighting specific lines#
Example:
1 2 3 4 5 6 7 8 | ``` python hl_lines="3 4"
""" Bubble sort """
def bubble_sort(items):
for i in range(len(items)):
for j in range(len(items) - 1 - i):
if items[j] > items[j + 1]:
items[j], items[j + 1] = items[j + 1], items[j]
```
|
Result:
1 2 3 4 5 6 | """ Bubble sort """ def bubble_sort(items): for i in range(len(items)): for j in range(len(items) - 1 - i): if items[j] > items[j + 1]: items[j], items[j + 1] = items[j + 1], items[j] |
PHP#
Example:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ``` php
<?php
// src/AppBundle/Controller/LuckyController.php
namespace AppBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Response;
class LuckyController {
/**
* @Route("/lucky/number")
*/
public function numberAction() {
$number = mt_rand(0, 100);
return new Response(
'<html><body>Lucky number: '.$number.'</body></html>'
);
}
}
```
|
Result:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | <?php // src/AppBundle/Controller/LuckyController.php namespace AppBundle\Controller; use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; use Symfony\Component\HttpFoundation\Response; class LuckyController { /** * @Route("/lucky/number") */ public function numberAction() { $number = mt_rand(0, 100); return new Response( '<html><body>Lucky number: '.$number.'</body></html>' ); } } |
JavaScript#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | var Math = require('lib/math'); var _extends = function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { target[key] = source[key]; } } return target; }; var e = exports.e = 2.71828182846; exports['default'] = function (x) { return Math.exp(x); }; module.exports = _extends(exports['default'], exports); |
JSON#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | { "name": "mkdocs-material", "version": "0.2.4", "description": "A Material Design theme for MkDocs", "homepage": "http://squidfunk.github.io/mkdocs-material/", "authors": [ "squidfunk <martin.donath@squidfunk.com>" ], "license": "MIT", "main": "Gulpfile.js", "scripts": { "start": "./node_modules/.bin/gulp watch --mkdocs", "build": "./node_modules/.bin/gulp build --production" } ... } |
HTML#
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | <!doctype html> <html class="no-js" lang=""> <head> <meta charset="utf-8"> <meta http-equiv="x-ua-compatible" content="ie=edge"> <title>HTML5 Boilerplate</title> <meta name="description" content=""> <meta name="viewport" content="width=device-width, initial-scale=1"> <link rel="apple-touch-icon" href="apple-touch-icon.png"> <link rel="stylesheet" href="css/normalize.css"> <link rel="stylesheet" href="css/main.css"> <script src="js/vendor/modernizr-2.8.3.min.js"></script> </head> <body> <p>Hello world! This is HTML5 Boilerplate.</p> </body> </html> |