Markdown Page Example: Difference between revisions

From sandbox
Jump to navigation Jump to search
No edit summary
No edit summary
Line 7: Line 7:




Download
---
--------
__Advertisement :)__


[Markdown 1.0.1][dl] (18 KB) -- 17 Dec 2004
- __[pica](https://nodeca.github.io/pica/demo/)__ - high quality and fast image
  resize in browser.
- __[babelfish](https://github.com/nodeca/babelfish/)__ - developer friendly
  i18n with plurals support and easy syntax.


[dl]: http://daringfireball.net/projects/downloads/Markdown_1.0.1.zip
You will like those projects!


---


Introduction
# h1 Heading 8-)
------------
## h2 Heading
### h3 Heading
#### h4 Heading
##### h5 Heading
###### h6 Heading


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).


Thus, "Markdown" is two things: (1) a plain text formatting syntax;
## Horizontal Rules
and (2) a software tool, written in Perl, that converts the plain text
formatting to HTML. See the [Syntax][] page for details pertaining to
Markdown's formatting syntax. You can try it out, right now, using the
online [Dingus][].


  [syntax]: /projects/markdown/syntax
___
  [dingus]: /projects/markdown/dingus


The overriding design goal for Markdown's formatting syntax is to make
---
it as readable as possible. The idea is that a Markdown-formatted
document should be publishable as-is, as plain text, without looking
like it's been marked up with tags or formatting instructions. While
Markdown's syntax has been influenced by several existing text-to-HTML
filters, the single biggest source of inspiration for Markdown's
syntax is the format of plain text email.


The best way to get a feel for Markdown's formatting syntax is simply
***
to look at a Markdown-formatted document. For example, you can view
the Markdown source for the article text on this page here:
<http://daringfireball.net/projects/markdown/index.text>


(You can use this '.text' suffix trick to view the Markdown source for
the content of each of the pages in this section, e.g. the
[Syntax][s_src] and [License][l_src] pages.)


  [s_src]: /projects/markdown/syntax.text
## Typographic replacements
  [l_src]: /projects/markdown/license.text


Markdown is free software, available under a BSD-style open source
Enable typographer option to see result.
license. See the [License] [pl] page for more information.


  [pl]: /projects/markdown/license
(c) (C) (r) (R) (tm) (TM) (p) (P) +-


test.. test... test..... test?..... test!....


Discussion List <a id="discussion-list" />
!!!!!! ???? ,,  -- ---
---------------


I've set up a public [mailing list for discussion about Markdown] [ml].
"Smartypants, double quotes" and 'single quotes'
Any topic related to Markdown -- both its formatting syntax and
its software -- is fair game for discussion. Anyone who is interested
is welcome to join.


It's my hope that the mailing list will lead to good ideas for future
improvements to Markdown.


  [ml]: http://six.pairlist.net/mailman/listinfo/markdown-discuss
## Emphasis


**This is bold text**


Installation and Requirements <a id="install" />
__This is bold text__
-----------------------------


Markdown requires Perl 5.6.0 or later. Welcome to the 21st Century.
*This is italic text*
Markdown also requires the standard Perl library module [Digest::MD5]
[md5], which is probably already installed on your server.


  [md5]: http://search.cpan.org/dist/Digest-MD5/MD5.pm
_This is italic text_


~~Strikethrough~~


### Movable Type ###


Markdown works with Movable Type version 2.6 or later (including
## Blockquotes
Movable Type 3.0).


1.  Copy the "Markdown.pl" file into your Movable Type "plugins"
directory. The "plugins" directory should be in the same directory
as "mt.cgi"; if the "plugins" directory doesn't already exist, use
your FTP program to create it. Your installation should look like
this:


        (mt home)/plugins/Markdown.pl
> Blockquotes can also be nested...
>> ...by using additional greater-than signs right next to each other...
> > > ...or with spaces between arrows.


2.  Once installed, Markdown will appear as an option in Movable Type's
Text Formatting pop-up menu. This is selectable on a per-post basis:
![Screenshot of Movable Type 'Text Formatting' Menu][tfmenu]
Markdown translates your posts to HTML when you publish; the posts
themselves are stored in your MT database in Markdown format.


3. If you also install SmartyPants 1.5 (or later), Markdown will
## Lists
offer a second text formatting option: "Markdown With
SmartyPants". This option is the same as the regular "Markdown"
formatter, except that it automatically uses SmartyPants to create
typographically correct curly quotes, em-dashes, and ellipses. See
the [SmartyPants web page][sp] for more information.


4. To make Markdown (or "Markdown With SmartyPants") your default
Unordered
text formatting option for new posts, go to Weblog Config:
Preferences.


Note that by default, Markdown produces XHTML output. To configure
+ Create a list by starting a line with `+`, `-`, or `*`
Markdown to produce HTML 4 output, see "Configuration", below.
+ Sub-lists are made by indenting 2 spaces:
  - Marker character change forces new list start:
    * Ac tristique libero volutpat at
    + Facilisis in pretium nisl aliquet
    - Nulla volutpat aliquam velit
+ Very easy!


  [sp]: http://daringfireball.net/projects/smartypants/
Ordered


1. Lorem ipsum dolor sit amet
2. Consectetur adipiscing elit
3. Integer molestie lorem at massa




### Blosxom ###
1. You can use sequential numbers...
1. ...or keep all the numbers as `1.`


Markdown works with Blosxom version 2.0 or later.
Start numbering with offset:


1. Rename the "Markdown.pl" plug-in to "Markdown" (case is
57. foo
    important). Movable Type requires plug-ins to have a ".pl"
1. bar
    extension; Blosxom forbids it.


2.  Copy the "Markdown" plug-in file to your Blosxom plug-ins folder.
    If you're not sure where your Blosxom plug-ins folder is, see the
    Blosxom documentation for information.


3.  That's it. The entries in your weblog will now automatically be
## Code
processed by Markdown.


4. If you'd like to apply Markdown formatting only to certain
Inline `code`
posts, rather than all of them, Markdown can optionally be used in
conjunction with Blosxom's [Meta][] plug-in. First, install the
Meta plug-in. Next, open the Markdown plug-in file in a text
editor, and set the configuration variable `$g_blosxom_use_meta`
to 1. Then, simply include a "`meta-markup: Markdown`" header line
at the top of each post you compose using Markdown.


  [meta]: http://www.blosxom.com/plugins/meta/meta.htm
Indented code


    // Some comments
    line 1 of code
    line 2 of code
    line 3 of code


### BBEdit ###


Markdown works with BBEdit 6.1 or later on Mac OS X. It also works
Block code "fences"
with BBEdit 5.1 or later and MacPerl 5.6.1 on Mac OS 8.6 or later. If
you're running Mac OS X 10.2 (Jaguar), you may need to install the
Perl module [Digest::MD5] [md5] from CPAN; Digest::MD5 comes
pre-installed on Mac OS X 10.3 (Panther).


1. Copy the "Markdown.pl" file to appropriate filters folder in your
```
"BBEdit Support" folder. On Mac OS X, this should be:
Sample text here...
```


        BBEdit Support/Unix Support/Unix Filters/
Syntax highlighting


    See the BBEdit documentation for more details on the location of
``` js
    these folders.
var foo = function (bar) {
  return bar++;
};


    You can rename "Markdown.pl" to whatever you wish.
console.log(foo(5));
```


2.  That's it. To use Markdown, select some text in a BBEdit document,
## Tables
then choose Markdown from the Filters sub-menu in the "#!" menu, or
the Filters floating palette


| Option | Description |
| ------ | ----------- |
| data  | path to data files to supply the data that will be passed into templates. |
| engine | engine to be used for processing templates. Handlebars is the default. |
| ext    | extension to be used for dest files. |


Right aligned columns


Configuration  <a id="configuration"></a>
| Option | Description |
-------------
| ------:| -----------:|
| data  | path to data files to supply the data that will be passed into templates. |
| engine | engine to be used for processing templates. Handlebars is the default. |
| ext    | extension to be used for dest files. |


By default, Markdown produces XHTML output for tags with empty elements.
E.g.:


    <br />
## Links


Markdown can be configured to produce HTML-style tags; e.g.:
[link text](http://dev.nodeca.com)


    <br>
[link with title](http://nodeca.github.io/pica/demo/ "title text!")


Autoconverted link https://github.com/nodeca/pica (enable linkify to see)


### Movable Type ###


You need to use a special `MTMarkdownOptions` container tag in each
## Images
Movable Type template where you want HTML 4-style output:


    <MTMarkdownOptions output='html4'>
![Minion](https://octodex.github.com/images/minion.png)
        ... put your entry content here ...
![Stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat")
    </MTMarkdownOptions>


The easiest way to use MTMarkdownOptions is probably to put the
Like links, Images also have a footnote style syntax
opening tag right after your `<body>` tag, and the closing tag right
before `</body>`.


To suppress Markdown processing in a particular template, i.e. to
![Alt text][id]
publish the raw Markdown-formatted text without translation into
(X)HTML, set the `output` attribute to 'raw':


    <MTMarkdownOptions output='raw'>
With a reference later in the document defining the URL location:
        ... put your entry content here ...
    </MTMarkdownOptions>


[id]: https://octodex.github.com/images/dojocat.jpg  "The Dojocat"


### Command-Line ###


Use the `--html4tags` command-line switch to produce HTML output from a
## Plugins
Unix-style command line. E.g.:


    % perl Markdown.pl --html4tags foo.text
The killer feature of `markdown-it` is very effective support of
[syntax plugins](https://www.npmjs.org/browse/keyword/markdown-it-plugin).


Type `perldoc Markdown.pl`, or read the POD documentation within the
Markdown.pl source code for more information.


### [Emojies](https://github.com/markdown-it/markdown-it-emoji)


Acknowledgements <a id="acknowledgements" />
> Classic markup: :wink: :crush: :cry: :tear: :laughing: :yum:
----------------
>
> Shortcuts (emoticons): :-) :-( 8-) ;)


[Aaron Swartz][] deserves a tremendous amount of credit for his feedback on the
see [how to change output](https://github.com/markdown-it/markdown-it-emoji#change-output) with twemoji.
design of Markdown's formatting syntax. Markdown is *much* better thanks
to Aaron's ideas, feedback, and testing. Also, Aaron's [html2text][]
is a very handy (and free) utility for turning HTML into
Markdown-formatted plain text.


[Nathaniel Irons][], [Dan Benjamin][], [Daniel Bogan][], and [Jason Perkins][]
also deserve thanks for their feedback.


[Michel Fortin][] has ported Markdown to PHP; it's a splendid port, and highly recommended for anyone looking for a PHP implementation of Markdown.
### [Subscript](https://github.com/markdown-it/markdown-it-sub) / [Superscript](https://github.com/markdown-it/markdown-it-sup)


  [Aaron Swartz]: http://www.aaronsw.com/
- 19^th^
  [Nathaniel Irons]: http://bumppo.net/
- H~2~O
  [Dan Benjamin]: http://hivelogic.com/
 
  [Daniel Bogan]: http://waferbaby.com/
 
  [Jason Perkins]: http://pressedpants.com/
### [\<ins>](https://github.com/markdown-it/markdown-it-ins)
   [Michel Fortin]: http://www.michelf.com/projects/php-markdown/
 
  [html2text]:         http://www.aaronsw.com/2002/html2text/
++Inserted text++
 
  [tfmenu]: /graphics/markdown/mt_textformat_menu.png
 
### [\<mark>](https://github.com/markdown-it/markdown-it-mark)
 
==Marked text==
 
 
### [Footnotes](https://github.com/markdown-it/markdown-it-footnote)
 
Footnote 1 link[^first].
 
Footnote 2 link[^second].
 
Inline footnote^[Text of inline footnote] definition.
 
Duplicated footnote reference[^second].
 
[^first]: Footnote **can have markup**
 
    and multiple paragraphs.
 
[^second]: Footnote text.
 
 
### [Definition lists](https://github.com/markdown-it/markdown-it-deflist)
 
Term 1
 
:  Definition 1
with lazy continuation.
 
Term 2 with *inline markup*
 
:  Definition 2
 
        { some code, part of Definition 2 }
 
    Third paragraph of definition 2.
 
_Compact style:_
 
Term 1
  ~ Definition 1
 
Term 2
   ~ Definition 2a
  ~ Definition 2b
 
 
### [Abbreviations](https://github.com/markdown-it/markdown-it-abbr)
 
This is HTML abbreviation example.
 
It converts "HTML", but keep intact partial entries like "xxxHTMLyyy" and so on.
 
*[HTML]: Hyper Text Markup Language
 
### [Custom containers](https://github.com/markdown-it/markdown-it-container)
 
::: warning
*here be dragons*
:::

Revision as of 18:42, 5 May 2022

Template:MARKDOWN


  • Under Construction


--- __Advertisement :)__

- __[pica](https://nodeca.github.io/pica/demo/)__ - high quality and fast image

 resize in browser.

- __[babelfish](https://github.com/nodeca/babelfish/)__ - developer friendly

 i18n with plurals support and easy syntax.

You will like those projects!

---

  1. h1 Heading 8-)
    1. h2 Heading
      1. h3 Heading
        1. h4 Heading
          1. h5 Heading
            1. h6 Heading


    1. Horizontal Rules

___

---


    1. Typographic replacements

Enable typographer option to see result.

(c) (C) (r) (R) (tm) (TM) (p) (P) +-

test.. test... test..... test?..... test!....

!!!!!! ???? ,, -- ---

"Smartypants, double quotes" and 'single quotes'


    1. Emphasis
    • This is bold text**

__This is bold text__

  • This is italic text*

_This is italic text_

~~Strikethrough~~


    1. Blockquotes


> Blockquotes can also be nested... >> ...by using additional greater-than signs right next to each other... > > > ...or with spaces between arrows.


    1. Lists

Unordered

+ Create a list by starting a line with `+`, `-`, or `*` + Sub-lists are made by indenting 2 spaces:

 - Marker character change forces new list start:
   * Ac tristique libero volutpat at
   + Facilisis in pretium nisl aliquet
   - Nulla volutpat aliquam velit

+ Very easy!

Ordered

1. Lorem ipsum dolor sit amet 2. Consectetur adipiscing elit 3. Integer molestie lorem at massa


1. You can use sequential numbers... 1. ...or keep all the numbers as `1.`

Start numbering with offset:

57. foo 1. bar


    1. Code

Inline `code`

Indented code

   // Some comments
   line 1 of code
   line 2 of code
   line 3 of code


Block code "fences"

``` Sample text here... ```

Syntax highlighting

``` js var foo = function (bar) {

 return bar++;

};

console.log(foo(5)); ```

    1. Tables

| Option | Description | | ------ | ----------- | | data | path to data files to supply the data that will be passed into templates. | | engine | engine to be used for processing templates. Handlebars is the default. | | ext | extension to be used for dest files. |

Right aligned columns

| Option | Description | | ------:| -----------:| | data | path to data files to supply the data that will be passed into templates. | | engine | engine to be used for processing templates. Handlebars is the default. | | ext | extension to be used for dest files. |


    1. Links

[link text](http://dev.nodeca.com)

[link with title](http://nodeca.github.io/pica/demo/ "title text!")

Autoconverted link https://github.com/nodeca/pica (enable linkify to see)


    1. Images

![Minion](https://octodex.github.com/images/minion.png) ![Stormtroopocat](https://octodex.github.com/images/stormtroopocat.jpg "The Stormtroopocat")

Like links, Images also have a footnote style syntax

![Alt text][id]

With a reference later in the document defining the URL location:

[id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat"


    1. Plugins

The killer feature of `markdown-it` is very effective support of [syntax plugins](https://www.npmjs.org/browse/keyword/markdown-it-plugin).


      1. [Emojies](https://github.com/markdown-it/markdown-it-emoji)

> Classic markup: :wink: :crush: :cry: :tear: :laughing: :yum: > > Shortcuts (emoticons): :-) :-( 8-) ;)

see [how to change output](https://github.com/markdown-it/markdown-it-emoji#change-output) with twemoji.


      1. [Subscript](https://github.com/markdown-it/markdown-it-sub) / [Superscript](https://github.com/markdown-it/markdown-it-sup)

- 19^th^ - H~2~O


      1. [\](https://github.com/markdown-it/markdown-it-ins)

++Inserted text++


      1. [\](https://github.com/markdown-it/markdown-it-mark)

Marked text

      1. [Footnotes](https://github.com/markdown-it/markdown-it-footnote)

Footnote 1 link[^first].

Footnote 2 link[^second].

Inline footnote^[Text of inline footnote] definition.

Duplicated footnote reference[^second].

[^first]: Footnote **can have markup**

   and multiple paragraphs.

[^second]: Footnote text.


      1. [Definition lists](https://github.com/markdown-it/markdown-it-deflist)

Term 1

Definition 1

with lazy continuation.

Term 2 with *inline markup*

Definition 2
       { some code, part of Definition 2 }
   Third paragraph of definition 2.

_Compact style:_

Term 1

 ~ Definition 1

Term 2

 ~ Definition 2a
 ~ Definition 2b


      1. [Abbreviations](https://github.com/markdown-it/markdown-it-abbr)

This is HTML abbreviation example.

It converts "HTML", but keep intact partial entries like "xxxHTMLyyy" and so on.

  • [HTML]: Hyper Text Markup Language
      1. [Custom containers](https://github.com/markdown-it/markdown-it-container)
warning
  • here be dragons*