This is a test markdown file to see whether Pandoc can convert it to html with preset header part inserted. To convert with a template, we need to prepare a html template in advance. The template will include the <head> part which contains the metadata, the title and the link to the stylesheet.css. $title$ will be used in the title part.
This is italic and this is bold.
This is the link to the “Home” of the website.
Below is a sample code in python:
import datetime
import os
text = "Welcome to the United States of America and have a nice day!"
length = len(text)
if length > 10:
print("It is so long!")
else:
print("Short!")
Will basic Markdown support strike through?
Bash command to convert Markdown to HTML by using Pandoc (without highlight but with a lua filter and a HTML template)
pandoc -s --lua-filter standard-code.lua --template template.html -f markdown+fenced_code_blocks --no-highlight input.md -o output.html
中文字体该如何解决?
Calculate the sum of a serie which includes all 3 digit integars which are multiples of 14 but aren’t multiples of 21.
Solve it by Python:
l = list(range(100, 1000))
li = []
for i in l:
if i % 14 == 0 and i % 21 != 0:
li.append(i)
print(sum(li))
pandoc -s --lua-filter standard-code.lua --template template.html -f markdown+fenced_code_blocks --no-highlight $1 -o $2
Run the script by
sh md2html.sh markdown.md markdown.html