MD Test
All posts are stored as MD files.
Posts are loaded using gray-matter which generates an MD string. Then I use rehype-highlight MDX plugin to convert markup into the HTML. RehypeHighlight parses text and inserts proper html tags for all the code sections. With proper CSS style this generates nice looking code sections.
Heading 2
Heading 3
Heading 4
List Example:
- Item A Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
- Item B Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
Code Sample Example: Javascript:
const Sketch = (W, H) => (p) => {
let PI = p.PI
let PI_2 = p.HALF_PI
let PI_4 = p.QUARTER_PI
let TWO_PI = p.TWO_PI
p.setup = () => {
p.createCanvas(W, H);
p.angleMode(p.RADIANS);
p.background(120);
}
p.draw = () =>
{
let space = 250;
let hSpace = space * 0.5;
p.translate(W / 2, H / 2);
p.noStroke();
//regular
{
let rX = p.random();
let rY = p.random() * space;
p.fill(255, 0, 0, 100);
p.circle(rX * space - hSpace, -rY, 10);
}
}
}
export default Sketch;
C#:
class Test
{
private int a = 0;
private void Start()
{
for(int i = 0; i < a; i++)
{
Debug.Log("i" + i);
}
}
}