Blog Template
April 19, 2020
Blog template
A template for markdown blogs with GitHub pages
Image using default html:
1|

Image using next/image, optimize image with builtin next (must have size of image)
1|<CustomImage src="/content/assets/blog-template/first_image.jpg" alt="first_image" width={700} height={460} />
Image using next-optimized-images
1|<CustomImage2 src="/content/assets/blog-template/first_image.jpg" alt="first_image" />
Note: All path of image must inside public folder
Instructions for deploying this blog template
If you plan on using this on your website, just click "Use this template" or fork this repo. I highly recommend dillinger markdown editor for editing markdown files. repl.it is also good. This repo has gh-pages as it's default branch. This will automatically put your README.MD file (this file) on yourusername.github.io/blog.
Markdown syntax and examples
Contents
* Headings
* Text styling
* Block Quotes
* Superscript and Subscript
* Code blocks
* Tables
* Lists
Heading 1
Heading 2
Heading 3
Heading 4
Heading 5
Heading 6
Text styling
*ignore markdown characters* Italic Bold Bold and italic
Block quotes
Intelligence is the ability to avoid doing work, yet getting the work done. -Linus Torvalds
Superscript and subscript
Superscript demonstrated by Einstein famous Mass–energy equivalence
E=MC2
Subscript demonstrated by the equation for finding the Nth Fibonacci number recursively
Fn=Fn-1+Fn-2
Code blocks
Wow, code block
1|Multi-line code block2|In markdown, makes a haiku3|Japanese poem
With JS syntax highlighting
1|function fib(n) {2| if (n < 2) return n;3| return fib(n - 1) + fib(n - 2);4|}
with Live
1|class Example extends React.Component {2| render() {3| return <strong>Hello World!</strong>;4| }5|}
Tables
Note: Tables sometimes render incorrectly when bieng viewed in a browser. If you are having this issue, view this file here
Column | Different column |
---|---|
Table thing one | their called arguments |
Row | No, their called parameters |
Cell | Actually, their called cells. |
Lists
- Top list -Other thing
- Top list 2
- Foo
- Bar
- Ack
- List item
- List item
- List item
- List item 1
- List item 2
- List item 3
The repo for this templateGo to my websiteGo to the live version of this file
strikethrough
(c) Kaz Malhotra 2019
Math
Must below code in markdown file
1|<link2| rel="stylesheet"3| href="https://cdn.jsdelivr.net/npm/katex@0.11.0/dist/katex.min.css"4| integrity="sha384-BdGj8xC2eZkQaxoQ8nSLefg4AV4/AwB3Fj+8SUSo7pnKP6Eoy18liIKTPn9oBYNG"5| crossOrigin="anonymous"6|/>
One line math
$L = \frac{1}{2} \rho v^2 S C_L$
Lift() can be determined by Lift Coefficient () like the following equation:
Multiple line math
1|$$2|L = \frac{1}{2} \rho v^2 S C_L3|$$
Lift() can be determined by Lift Coefficient () like the following equation: