Markdown Simplifies Formatting Your DW Posts
Tuesday, January 8th, 2019 06:52 pm![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Markdown is a minimal way to format your text. The goal is to use "natural" formats, similar to email. Software that understands Markdown translates it to HTML. Markdown is much easier--and more forgiving--than HTML. This post has the markdown you'll use the most. The rest of the features are explored later.
The full spec is hosted by its creator, Jon Gruber https://daringfireball.net/projects/markdown/syntax
Using Markdown Here at Dreamwidth
Markdown is welcome everywhere except in subject lines. You can use it for posts, comments, email posts.
Markdown is a silent feature inside Dreamwidth's HTML editor. You turn it on by making the first line of the post:
!markdown
Now Dreamwidth interprets any Markdown you type. By definition, Markdown includes HTML, so you can also use HTML to format your post—for Dreamwidth cuts, image embeds, and any other HTML task.
Bold, strong, italic, emphasis
Begin and end text with either _ underscore or * asterisk
Use ONE for emphasis aka italic
Use TWO for strong aka bold
Markdown:
The *rain* in _Spain_ falls *mainly* on _the Plain_.
I **think** she's __got it__, she's **finally** got __IT__!
Displays as:
The rain in Spain falls mainly on the Plain. I think she's got it, she's finally got IT!
DW usernames
Prefix the account with an "@" sign
@jesse_the_k ⇒ jesse_the_k
@access_fandom ⇒ access_fandom
@dw_news ⇒ dw_news
Usernames elsewhere
For other sites, use the format @username.site
Some examples:
@jesse_the_k.ao3 ⇒ jesse_the_k
@jesse-the-k.tumblr ⇒ jesse-the-k
@jesse_the_k.twitter ⇒ jesse_the_k
see DW FAQ 87 for all the supported sites
ETA: I originally had this wrong--thanks to bluewinged_songbird and
syntheid for setting me straight!
Lists
Markdown:
Bullet lists begin and end with a blank line
- then any number of lines that
- begin with a hyphen
- and a space
- like this one
must have a blank line to turn off the list
Displays as:
Bullet lists begin and end with a blank line
- then any number of lines
- that begin with a hyphen
- and a space
- like this one
must have a blank line to turn off the list
Numbered lists (called ordered lists <ol> in HTML) use digits instead of hyphens. The presence of a digit and a period is what does it:
Markdown:
must have a blank line
4. then any number of lines
1. that begin with a digit and
290. then a period, like this one
2. and this one
2. and so on
must have a blank line to turn off numbering
displays as:
must have a blank line
- then any number of lines
- that begin with a digit and
- then a period, like this one
- and this one
- and so on
must have a blank line to turn off numbering
The value of the number doesn't matter, and the list always starts at 1!
Horizontal rule
Three or more asterisks, with blank line before & after. Markdown:
***
Displays as:
[ETA: this also works with hyphens, but hyphens will end your post early when you're replying or posting by email]
LINKS
Inline
Write your link text (aka anchor) in square brackets immediately followed by the URL in parentheses.
Markdown:
The source repository is located at [Dreamwidth's GitHub Repositories](https://github.com/dreamwidth/).
Displays as:
The source repository is located at Dreamwidth's GitHub Repositories.
Go bare
Enclose URLs and email addresses within angle brackets and they're clickable
<https://example.com>
⇒ https://example.com/
<address@example.com>
⇒ address@example.com
CODE SAMPLES
Surround code with ` backtick
Markdown: Remember to turn on this feature by beginning your post or email with `!markdown` followed by a blank line.
Displays as:
Remember to turn on this feature by beginning your post or email with !markdown
followed by a blank line.
(no subject)
Date: 2019-01-09 01:13 am (UTC)(no subject)
Date: 2019-01-09 01:31 am (UTC)I think this will help make the Tumblr refugees more at ease.
(I was not planning on a rhyme...)
(no subject)
Date: 2019-01-09 01:32 am (UTC)(no subject)
Date: 2019-01-09 02:49 am (UTC)(no subject)
Date: 2019-01-09 02:50 am (UTC)(no subject)
Date: 2019-01-09 02:53 am (UTC)Ooops, I wanted to say that to somebody else.
/o\
(no subject)
Date: 2019-01-09 03:46 am (UTC)1. Does it support ```...``` fencing for multi-line code snippets? (Github Flavored Markdown and maybe others)?
2. Can Markdown conversion get done on posts submitted via XML-RPC? (This isn't all that important to me, since I pipe Markdown drafts through
pandoc
in my client, but it could make a difference to folks with other clients.)(no subject)
Date: 2019-01-09 04:18 am (UTC)(no subject)
Date: 2019-01-09 06:53 am (UTC)(no subject)
Date: 2019-01-09 07:06 am (UTC)(no subject)
Date: 2019-01-09 07:57 am (UTC)One thing, you can actually use markdown for usernames on other sites too. Per
(no subject)
Date: 2019-01-09 12:16 pm (UTC)(no subject)
Date: 2019-01-09 02:43 pm (UTC)!markdown
and submitting it with a client such ascharm
does, in fact, format it with Markdown.(no subject)
Date: 2019-01-09 03:55 pm (UTC)Though if I post by email, I know I have to be careful of the horizontal rule. My email posts used to get cut off at the HR.
(no subject)
Date: 2019-01-09 11:12 pm (UTC)But I love it when you
Date: 2019-01-09 11:13 pm (UTC)UR WELCOME
Date: 2019-01-09 11:13 pm (UTC)(no subject)
Date: 2019-01-09 11:13 pm (UTC)Also, reply-by-email defaults to markdown--you don't even have to add the !markdown on-switch.
(no subject)
Date: 2019-01-09 11:16 pm (UTC)(no subject)
Date: 2019-01-09 11:17 pm (UTC)They link to Jon Gruber's original spec, so I suspect it dates back to that engine.
(no subject)
Date: 2019-01-09 11:20 pm (UTC)(no subject)
Date: 2019-01-09 11:21 pm (UTC)(no subject)
Date: 2019-01-09 11:21 pm (UTC)(no subject)
Date: 2019-01-09 11:25 pm (UTC)Re: But I love it when you
Date: 2019-01-09 11:32 pm (UTC)