It's an illusion, Michael (Markdown add-ons) in Tips and Tricks

  • Aug. 27, 2014, 6:34 p.m.
  • |
  • Public

OK, haven’t had any entry formatting complaints, so I’m assuming all is well. So I’ll quickly mention a few new things that got added into the mix. I will try to order these from simple to advanced, so feel free to stop reading once I start saying things that do not make any sense to you.

Wait… where did everyone go?

Maaaaan.


OK, so here’s the new magic mixed into the Markdown:

  1. Smart quotes and punctuation.

    You may or may not have noticed that your straight quotes are getting converted into curly quotes. So 'this' now looks like ‘this’. And "these" look like “these”. It’s great for apostrophes too.

    The hardcore punctuation geeks will be happy to know that beyond the normal dash (-), -- gets converted to an n-dash (–), and --- gets converted to an m-dash (—). And three dots ... becomes a single horizontal ellipsis character…

    (For people who use HTML, this will have no effect inside of tags since that would cause mass chaos)

  2. Footnotes

    I’ve mentioned this before, but it’s worth mentioning again. Inserting a footnote is done like this:

    Great Googly[^1] Moogly!
    [^1]: Not to be confused with the *Google*.
    

    Which gives you:

    Great Googly1 Moogly!

    (footnote definitions show up at the end of the entry so that’s a good place to put the second line in my example, though I don’t think it’s strictly required)

  3. Abbreviations

    This one is a lot like footnotes. Here’s an example:

    Sharks with frickin' LASER beams
    *[LASER]: Light Amplification by Stimulated Emission of Radiation
    

    Which gives you:

    Sharks with frickin’ LASER beams
    (hover over the underlined word and pause for effect)

  4. Definition list

    Here’s what a definition list looks like in Markdown:

    Fedora
    :    a hat
    
    Beanie
    :    also a hat
    

    (that’s four spaces between the colon and the definition)
    And you get:

    Fedora
    a hat
    Beanie
    also a hat
  5. Attribute lists

    And now we reach the part where I expect some heads to start spinning like in The Exorcist.

    This part lets you use combine your HTML skillz with Markdown to turn yourself into some sort of formatting CONSTRUCTICON2. If you know anything about CSS selectors, you should feel right at home. It also helps to understand the difference between a block level element and an inline element.

    An attribute list follows an element and looks like this:

    {: .class-name #id }
    

    It’s basically a list of CSS selectors you want applied to the Markdown element above it (or adjacent, if it’s inline - but we’ll get to that).

    Example: you want to apply the text-center class to a paragraph without using HTML. You can do it like so:

    Center this paragraph
    {: .text-center }
    

    (I would demo this but centering things inside my numbered list won’t really work)

    Or, say you have a picture you want to display with a circular border. You could use an HTML image tag with the img-circle class, or do this:

    ![Flowers](https://farm4.staticflickr.com/3342/3499065885_16aa778da0_q.jpg){: .img-circle }
    

    Since images are an inline element (I warned you that this part is advanced), the attribute list actually goes on the same line as the Markdown, with no line break or white space (you can’t add a space between the closing parentheses and opening curly brace).

    And, voila:

    Flowers

    If you want to get really wild and crazy, here’s the documentation.


  1. Not to be confused with the Google

  2. The Constructicons were a set of Transformers I had as a kid which transformed and combined to make one big super-robot similar to the Power Rangers. 


Deleted user August 27, 2014

"It's not a trick, it's an illusion. Tricks are what whores do for money."

Love me some AD.

simple mind Deleted user ⋅ August 27, 2014

Or candy!

Deleted user simple mind ⋅ August 27, 2014

I was thinking about writing some erotics on here, how would that be affected by any TOS you plan on enacting?

simple mind Deleted user ⋅ August 27, 2014

I don't plan to ban erotic writing (pornographic images will be, however). But I do ask that you make it something other than Public, and if it's Members Only put an NSFW disclaimer at the beginning just to warn people. I want to add an NSFW flag so those not interested can filter it out of their feed at some point, but for now I do appreciate the warning to others.

Deleted user simple mind ⋅ August 27, 2014

Thank you!

Ad Astra Per Alas Porci. August 27, 2014

Oh awesome! I'm a fan of the circle image, Thanks for these!

Deleted user August 27, 2014

Thanks!

Deleted user August 27, 2014

You have good teaching skills!

simple mind Deleted user ⋅ August 27, 2014

Thanks!

perfunctory August 27, 2014

I want all of my pictures to have a circular border now.

Meginsanity August 27, 2014

So happy about the smart quotes. I don't know why... they just make me happy.

EvequeFou August 27, 2014

Is there a concise list of the classes we can use, or do we go digging in your CSS files?

simple mind EvequeFou ⋅ August 27, 2014

I think some of these things have been documented in the wiki, but if you want to really get into the CSS, you can take a look at the Bootstrap CSS documentation. That's the framework Prosebox uses, and while a lot of it's more specific to what I need to design and build the site, there's a few useful things that can be leveraged by the users.

EvequeFou simple mind ⋅ September 01, 2014

Hadn't seen the FAQ before! I see there are text things done with classes -- is there a way to use this for inline text, or is a <span needed for anything more granular than a paragraph?

simple mind EvequeFou ⋅ September 02, 2014

Probably a <span> if there's not already an inline element to apply classes to.

Mercurial Muse August 28, 2014

Yes, a proper dash! I am so excited. Thank you :)

Starhawk August 28, 2014

Hot damn.

Deleted user August 28, 2014

Makes perfect sense to us web developers. :)

Cat Mommy August 28, 2014

Did you decrease the margin size on entries again or am I going nuts?

simple mind Cat Mommy ⋅ August 28, 2014

Yeah, I was experimenting with one pixel of padding to see if it fixed an issue where I was seeing the edge of buttons being cut off. The width now be back to what it was exactly.

Cat Mommy simple mind ⋅ August 28, 2014

Hmmm... it's still a bit off for me. Oh well.

simple mind Cat Mommy ⋅ August 28, 2014

Try Ctrl-Shift-R to refresh your page.

Cat Mommy simple mind ⋅ August 28, 2014

Stays the same. Is it something on my end?

Deleted user August 28, 2014

LOL, I'm never going to remember all this.

Everything Good Rebecca August 28, 2014

I should print out entries like this one so I can have a Markdown reference manual I guess. Thanks for taking the time to be creative in your examples, too!

One Angry Dwarf August 29, 2014

I got to the abbreviations bit, and said out loud to my empty apartment:

"Oh my God, I am going to abuse the shit out of this."

And then the rest was a friendly reminder that I don't know shit about how to do interwebs formatting anymore. CAN WE PLEASE GO BACK TO 1999 FOR A WHILE THX

Shattered August 29, 2014

head spins

Deleted user September 02, 2014

For avatars, is there an ideal size for them to be like 100 x 100 or something?

simple mind Deleted user ⋅ September 02, 2014

On the profile page it gets resized to 120x120 pixels I believe. There are smaller thumb versions on other pages, depending on the size of the device.

Deleted user simple mind ⋅ September 02, 2014

Thank you!

You must be logged in to comment. Please sign in or join Prosebox to leave a comment.