Table of contents
  1. GitHub Linguist
    1. Working aliases
      1. powershell
      2. batch
      3. bash / shell / .sh
      4. XML
      5. C#
  2. GitHub Styling Quirks
    1. visible in GitHub md page
    2. visible online
    3. Adding Image
  3. Pandoc
    1. Add Table of Contents to mark down doc with pandoc
    2. docx to markdown
    3. scripts
      1. convert to docx
    4. files
      1. Example Used




GitHub Linguist

Code block Syntax yml

Working aliases

  • powershell

    posh , powershell, bat

  • batch

    batch, bat, dosbatch, winbatch

  • bash / shell / .sh

    sh, shell, zsh , bash

  • XML

    xml

  • C#

    csharp, cs


GitHub Styling Quirks

visible in GitHub md page

> **Note** > <br/>
> This is a note

Note >

This is a note

> **Warning** > <br/>
> This is a warning

Warning >

This is a warning

visible online


<div
        style="padding: 15px; border: 1px solid transparent; border-color: transparent; margin-bottom: 20px; border-radius: 4px; color: #3c763d; background-color: #dff0d8; border-color: #d6e9c6;"
>
    I am a success message
</div>
I am a success message


<div
        style="padding: 15px; border: 1px solid transparent; border-color: transparent; margin-bottom: 20px; border-radius: 4px; color: #a94442; background-color: #f2dede; border-color: #ebccd1;"
>
    I am an error message
</div>
I am an error message


<div
        style="padding: 15px; border: 1px solid transparent; border-color: transparent; margin-bottom: 20px; border-radius: 4px; color: #31708f; background-color: #d9edf7; border-color: #bce8f1;"
>
    I am an info message
</div>
I am a info message


<div
        style="padding: 15px; border: 1px solid transparent; border-color: transparent; margin-bottom: 20px; border-radius: 4px; color: #8a6d3b;; background-color: #fcf8e3; border-color: #faebcc;"
>
    I am a warning message
</div>
I am a warning message

Adding Image

![kubernetes.gif](../../assets/images/kubernetes.gif)
![kubernetes.gif](./assets%2Fimages%2Fkubernetes.gif)
<img
        src="https://github.com/14paxton/14paxton.github.io/blob/master/assets/images/kubernetes.gif?raw=true"
        alt="kubernetes"
/>
![kubernetes](https://raw.githubusercontent.com/14paxton/14paxton.github.io/master/assets/images/kubernetes.gif)

Pandoc

Add Table of Contents to mark down doc with pandoc

  1. set file name
fileMD=CLI_Grailsw.md;
  1. run
pandoc -s --toc $fileMD -o output.md; rm -f $fileMD; mv output.md ./$fileMD;

docx to markdown

pandoc -s example30.docx --wrap=none --reference-links -t markdown -o example35.md

or

pandoc -t markdown_strict \
--extract-media='./BrandonPaxton' myfilename.docx -o myfilename.md

scripts

convert to docx

#!/bin/bash

# save input from command line
  input=$1

# get filename from input
  filename=$(basename -s .docx $input)

# convert word to markdown
  pandoc -f docx -t markdown "$input"  -o $filename.md

files

#!/bin/bash

# save current working directory to variable
  cwd=$(pwd)

# find all .docx files in current directory
  find $cwd -name "*.docx" -type f -print0 | while IFS= read -r -d $'\0' line; do

# remove spaces in filename
  ns_filename=$(echo $line | sed 's/ /_/g')

# get filename from input
  the_filename=$(basename -s .docx $ns_filename)

# convert word to markdown
# echo "pandoc -f docx -t markdown \"$line\" -o $the_filename.md"
  pandoc -f docx -t markdown "$line" -o $the_filename.md
  done

Example Used

  #!/bin/bash
  pandoc -t markdown_strict -s BrandonPaxton.docx --wrap=none --reference-links -t markdown -o BPResume.md;