Skip to content

Commit c59b0a6

Browse files
committed
Added highlightjs support
1 parent 112524c commit c59b0a6

File tree

6 files changed

+49
-1
lines changed

6 files changed

+49
-1
lines changed

docs/Tools_Equipment/CNC/index.md

+36
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
11
# Ox CNC
22

33
Test
4+
5+
``` python
6+
@requires_authorization
7+
def somefunc(param1='', param2=0):
8+
r'''A docstring'''
9+
if param1 > param2: # interesting
10+
print 'Gre\'ater'
11+
return (param2 - param1 + 1 + 0b10l) or None
12+
13+
class SomeClass:
14+
pass
15+
16+
>>> message = '''interpreter
17+
... prompt'''
18+
```
19+
20+
21+
``` python
22+
for page in pages:
23+
page.read()
24+
```
25+
26+
``` csharp
27+
using System;
28+
29+
namespace HelloWorld
30+
{
31+
class Program
32+
{
33+
static void Main(string[] args)
34+
{
35+
Console.WriteLine("Hello World!");
36+
}
37+
}
38+
}
39+
```

docs/js/hljs/config.js

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
hljs.initHighlighting()

mkdocs.yml

+12-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,19 @@ site_url: https://docs.hacman.org.uk
33
repo_url: https://github.com/HACManchester/documentation/
44
theme:
55
name: material
6-
custom_dir: 'custom/theme'
6+
custom_dir: 'theme'
77
plugins:
88
- search
99
- mdoctag
1010
- emailprotect
11+
markdown_extensions:
12+
- pymdownx.highlight:
13+
use_pygments: false
14+
15+
extra_javascript:
16+
# HighlightJS for coloring in code blocks - https://highlightjs.org/static/demo/
17+
- https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/highlight.min.js
18+
- js/hljs/config.js
19+
extra_css:
20+
# HighlightJS for coloring in code blocks - https://highlightjs.org/static/demo/
21+
- https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.1.2/styles/atelier-dune-light.min.css
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)