Markdown notes

Markdown

Markdown guide

Compiling Markdown

cheatsheet

code blocks

for code blocks

With syntax highlighting:

var = a
print a

Blockquotes

this is a blockquote
with line 2

quote break

and another quote.

Rule

Three or more



line breaks

use 2 spaces for lines
next line

2 returns for paragraph.

2nd paragraph

Using MS Visual Studio Code

In terminal window, run

py -3 --version

To edit a file from ubuntu in VS Code, in the ubuntu folder type

code .
Or go in to vs code and navigate to it.

installation and setup

need markdown-it, so needed to install more packaged to get it. installed nodejs on ubuntu installed npm on ubuntu installed markdown-it on ubuntu that automatically got python 2.7 onto my machine ubuntu environment.

sudo apt install nodejs sudo apt install npm npm install -g markdown-it

settings files

User settings in settings.json file, or UI. Workspace settings in the .vscode folder

To snapshot images

using "Paste Image" extension from Mushan

I've set this up so images go into \jbnotes_images subfolder, with no prefix, and the datetime as the file name

Compiling with markdown-it

  1. ubuntu created directory markdown_notes under ~ create sample.md file with simple markdown.

Simple example:

markdown-it git.md -o git.html

  1. Create tasks.json Use VSCode to create a template to access markdown-it from vs code. Add a label, and command

"command": "markdown-it sample.md -o sample.html"

Puts tasks.json in vsCode subdir.

  1. Run the build
    in VSCode, Terminal -> run task puts output in the same folder.

Alternative MD compiler: pandoc

Pandoc tips

Deployment to AWS

  1. run compile_all_md.sh
  2. copy the html folder to S3 bucket

Style for HTML

Add to each file:

<LINK href="air_style_sheet.css" rel="stylesheet" type="text/css"> Source style sheets from e.g. https://markdowncss.github.io/