jesse_the_k: Professorial human suit but with head of Golden Retriever, labeled "Woof" (doctor dog to you)
Jesse the K ([personal profile] jesse_the_k) wrote2019-01-08 06:52 pm

Markdown Simplifies Formatting Your DW Posts

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 ⇒ [personal profile] jesse_the_k

@access_fandom ⇒ [community profile] access_fandom

@dw_news ⇒ [site community profile] dw_news

Usernames elsewhere

For other sites, use the format @username.site

Some examples:

@jesse_the_k.ao3 ⇒ [archiveofourown.org profile] jesse_the_k

@jesse-the-k.tumblr ⇒ [tumblr.com profile] jesse-the-k

@jesse_the_k.twitter ⇒ [twitter.com profile] jesse_the_k

see DW FAQ 87 for all the supported sites

ETA: I originally had this wrong--thanks to [personal profile] bluewinged_songbird and [personal profile] 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

  1. then any number of lines
  2. that begin with a digit and
  3. then a period, like this one
  4. and this one
  5. 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.

redbird: closeup of me drinking tea, in a friend's kitchen (Default)

[personal profile] redbird 2019-01-09 01:13 am (UTC)(link)
Thank you!!
capri0mni: A black Skull & Crossbones with the Online Disability Pride Flag as a background (Default)

[personal profile] capri0mni 2019-01-09 01:31 am (UTC)(link)
Thank you! I will be signal boosting.

I think this will help make the Tumblr refugees more at ease.

(I was not planning on a rhyme...)
squidgiepdx: (Default)

[personal profile] squidgiepdx 2019-01-09 01:32 am (UTC)(link)
Bookmarking - THANK YOU! :)
delight: (Default)

[personal profile] delight 2019-01-09 02:49 am (UTC)(link)
I use markdown because it makes mobile way easier and because my word processor of choice uses it. I can't wait for it to be a thing in comments because I use mobile commenting way more than posting.
kore: (Dreamwidth - green)

[personal profile] kore 2019-01-09 02:50 am (UTC)(link)
Wow, v helpful! Thanks!
mdlbear: (hacker glider)

[personal profile] mdlbear 2019-01-09 03:46 am (UTC)(link)
Nice! A couple of questions:

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.)
emceeaich: A close-up of a pair of cats-eye glasses (Default)

[personal profile] emceeaich 2019-01-09 06:53 am (UTC)(link)
I need to dig through the repo to see which markdown engine is used here. At Mozilla we just enabled Markdown comments in Bugzilla, and that engine implements the GitHub flavor. Maybe someone could try dropping it in?
luzula: a Luzula pilosa, or hairy wood-rush (Default)

[personal profile] luzula 2019-01-09 07:06 am (UTC)(link)
Huh, I had no idea, thank you! I mean, I'd have to retrain myself from html, but this does look like it would save some typing.
bluewinged_songbird: Chappell Roan pulled off-screen by a redhead magician (Steve Rogers)

[personal profile] bluewinged_songbird 2019-01-09 07:57 am (UTC)(link)
Oh this is nice! Very concise and straightforward.

One thing, you can actually use markdown for usernames on other sites too. Per [personal profile] syntheid's post, it would look like @something.twitter

[personal profile] raino 2019-01-09 12:16 pm (UTC)(link)
Thanks! This is super useful!
replyhazy: (Default)

[personal profile] replyhazy 2019-01-09 03:55 pm (UTC)(link)
How nice!

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.
finch: (Default)

[personal profile] finch 2019-01-11 06:28 am (UTC)(link)
Thank you for this! I'd picked up some of the markdown by osmosis but this actually makes it usably clear for me!
swingandswirl: text 'tammy' in white on a blue background.  (Default)

[personal profile] swingandswirl 2019-01-11 12:42 pm (UTC)(link)
... you are WONDERFUL. /hands big basket of treat of choice/

/saves to Evernote/
thedarlingone: black cat in front of full moon in dark blue sky (Default)

[personal profile] thedarlingone 2019-01-11 04:24 pm (UTC)(link)
Woohoo! I generally use HTML in the posting box (I am a Livejournal fossil and gave up on rich text editors a long time ago), but that's been kicking my tail on mobile posts. So I've actually been using Markdown formatting but not knowing how to make it apply, just leaving it "bare". This is *amazing*. :D

(And I will be very happy when it works in comments as well. ^_^)

[personal profile] ligie 2019-01-11 05:08 pm (UTC)(link)
It makes mobile posting so much easier. Thank you!
applenym: Two red apples leaning toward each other as if talking. Text above reads "applenym." (Default)

[personal profile] applenym 2019-01-11 09:28 pm (UTC)(link)
Thank you!! This is so helpful, especially since I use a markdown editor to write my posts already.
silveradept: A kodama with a trombone. The trombone is playing music, even though it is held in a rest position (Default)

[personal profile] silveradept 2019-01-18 03:43 pm (UTC)(link)
Much appreciated. Occasionally it's easier to think in Markdown when trying to compose, and I keep forgetting that it's an option for Dreamwidth.
zenolalia: A lalafell wearing rabbit ears stares wistfully into the sunset, asking Yoshi-P when male viera will come back from the war. (Default)

[personal profile] zenolalia 2019-01-18 10:41 pm (UTC)(link)
Ah, fantastic! Thank you for letting us know about this rad feature!
tropicsbear: Close up of man's deadpan face with an excited caption "omg omg yay" (Excited)

[personal profile] tropicsbear 2019-01-19 02:26 pm (UTC)(link)
I wasn't aware that there was a way to do the other-site-username with Markdown *A* Thanks for putting this together! Hope it's okay if I link to this.
goodbyebird: Comics: The Hulk is snuggling Spider-Woman. It's adorable. (C ∞ snuggles)

[personal profile] goodbyebird 2019-01-19 03:01 pm (UTC)(link)
Very useful, thanks!
naraht: Moonrise over Earth (Default)

[personal profile] naraht 2019-01-19 08:40 pm (UTC)(link)
Wow, this is really useful, thanks!
lovepeaceohana: Eggman doing the evil laugh, complete with evilly shining glasses. (Default)

[personal profile] lovepeaceohana 2019-01-20 02:18 am (UTC)(link)
Oh my god, is markdown the reason fandom seems to have permanently adopted *** as page/scene separation marks?!
genarti: Baby sloth looking over edge of cardboard box, with text "...duuuude." ([misc] duuuuuude)

[personal profile] genarti 2019-01-20 06:55 am (UTC)(link)
Oh this is fascinating! I had no idea. Thanks so much for laying it out so clearly!
sophus: (Default)

[personal profile] sophus 2019-01-21 06:49 pm (UTC)(link)
Oh, this is useful!
felinejumper: A topless woman slumped on a book and looking at a cat (Default)

[personal profile] felinejumper 2019-01-22 02:23 am (UTC)(link)
Holy SHIT I cannot believe the post editor accepts markdown THANK YOU THANK YOU THANK YOU.

Page 1 of 2