Markdown

From Omnia
Revision as of 02:37, 27 October 2023 by Kenneth (talk | contribs) (→‎Syntax)
Jump to navigation Jump to search

Markdown

Getting started with writing and formatting on GitHub - GitHub Help - https://help.github.com/articles/markdown-basics/

Daring Fireball: Markdown - http://daringfireball.net/projects/markdown/

"Markdown is a text-to-HTML conversion tool for web writers. Markdown allows you to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML)."

---

Markdown - Wikipedia - http://en.wikipedia.org/wiki/Markdown

"Markdown is a lightweight markup language, originally created by John Gruber with substantial contributions from Aaron Swartz, allowing people “to write using an easy-to-read, easy-to-write plain text format, then convert it to structurally valid XHTML (or HTML)”. The language takes many cues from existing conventions for marking up plain text in email. In other words, Markdown is a text-to-HTML conversion tool (for web writers).
Markdown is also a Perl script written by Gruber, Markdown.pl, which converts marked-up text input to valid, well-formed XHTML or HTML and replaces left-pointing angle brackets ('<') and ampersands with their corresponding character entity references. It can be used as a standalone script, as a plugin for Blosxom or Movable Type, or as a text filter for BBEdit.
Markdown has since been re-implemented by others as a Perl module available on CPAN (Text::Markdown), and in a variety of other programming languages. It is distributed under a BSD-style license[3] and is included with, or available as a plugin for, several content-management systems.
Sites such as GitHub, reddit, Stack Overflow and SourceForge use Markdown to facilitate discussion between users."

Quick Reference

https://commonmark.org/help/

Tutorial

https://commonmark.org/help/tutorial/

Testing

https://spec.commonmark.org/dingus/

Syntax

A First Level Header
====================

A Second Level Header
---------------------

Now is the time for all good men to come to
the aid of their country. This is just a
regular paragraph.

The quick brown fox jumped over the lazy
dog's back.

# This is an H1 #

## This is an H2 ##

### This is an H3 #########

> This is a blockquote.
> 
> This is the second paragraph in the blockquote.
>
> ## This is an H2 in a blockquote

Some of these words *are emphasized*.
Some of these words _are emphasized also_.

Use two asterisks for **strong emphasis**.
Or, if you prefer, __use two underscores instead__.

The following all produce the same unordered list styles:

*   Candy.
*   Gum.
*   Water.
**   Salt.

+   Candy.
+   Gum.
+   Booze.

-   Candy.
-   Gum.
-   Booze.

Ordered list:

1.  Red
2.  Green
3.  Blue

This is an [example link](http://example.com/).

This is an [example link](http://example.com/ "With a Title").

Reference style links:

I get 10 times more traffic from [Google][1] than from
[Yahoo][2] or [MSN][3].

[1]: http://google.com/        "Google"
[2]: http://search.yahoo.com/  "Yahoo Search"
[3]: http://search.msn.com/    "MSN Search"

Source: http://daringfireball.net/projects/markdown/basics

GitHub Flavored Markdown

See GitHub/GitHub Flavored Markdown

Linux

Convert to HTML

sudo apt install markdown
markdown file.md > file.html

ref: [1]

convert to DOCX

Pandoc can convert into several different formats

sudo apt install pandoc
pandoc file.md -f markdown -t html -s -o file.html
pandoc file.md -f markdown -t docx -s -o file.docx

ref: [2]

keywords