I am a slacker. This is something I've known about myself for a very long time. But I also have lofty goals and people who depend on me. So I can't afford to be a slacker, sometimes in the most literal sense of "afford". So because of this I have to regiment my days, planning out what I have to do and setting checkpoints and goals to make sure things get done.
Every day I try to learn something. This is something instilled in me from a fairly young age, but it's certainly served me well leading to a fairly rapid career progression and success early in life.
Combining these two facts with my drive to help people and spread some of what I've learned has lead me to start this blog. If I set the expectation that I need to both learn something every day and write about it, then it will help keep me on task and off Youtube or Reddit or whatever other time-suck is keeping me from improving myself for the day.
I'm not vain enough to expect anyone to be hanging on my every word, I'm certainly no celebrity, nor do I wish to be, but hopefully in my journey through life and my career I'll learn something and by sharing it I can improve someone else's life along the way.
So, without further adieu, Today I Learned: Markdown.
This blogging platform prose.sh uses Markdown for its users to format blog posts. In my professional life I've written Wiki pages and a little bit of LaTeX (pronounced "La-Tech" for the uninitiated) so Markdown didn't feel unfamiliar, but I had never actually taken the time to learn how to write it. So I fired up A Tutorial and learned the basics of Markdown.
Honestly that tutorial is a much better teacher than I can ever be with just a wall of text like this, but this is a good reference for basic Markdown structure.
- Basic Formatting
- Words and phrases you want to be italicized are surrounded by "_" (underscores)
- Words and phrases you want to be emboldened are surrounded by "**" (double asterisks)
- These two can be combined to be very emphatic
- Headings
- Headings work with a "#" (pound or hash or octothorpe) character at their beginning.
- There are six levels of heading, the largest having one hash (Such as the title of this post) and the smallest having six hashes (which is why reading raw markdown can be kinda ugly sometimes)
- Links
- There are multiple types of links, inline and reference and they're exactly the same once the Markdown renders`
[Inline Link Text](Link Location)
gets you a link with text and a location inline (very apt name)[Reference Link Text][Reference Link Location]
gets you a link and you define the link location later in the document with a
[Reference Link Location]: www.somelocation.com
. This is handy for reading if you want to keep all your link locations grouped together somewhere else.
- Images
- Images follow the same rules and nearly the same syntax as Links
![Inline Image Alt Text](image location)
![Reference Image Alt Text][Reference Image Location]
[Reference Image Location]: somewhere.com/something.jpg
- It's worth noting that image locations can be referenced with a full domain name (e.g. https://duckduckgo.com/assets/logo_homepage.normal.v108.svg) or with a local name like `/images/a_picture.jpg. Whatever works for your context.
- Block quotes
- If you've ever been on Reddit or any other site that allows comments to be made about comments (not Facebook) then you've probably seen a Blockquote used when someone references part of the comment or article they're commenting about. Eg:
"Someone references part of the comment or article they're commenting about"
- This is done by using the greater than symbol ">" and then following that with your blockquote
- Blockquotes can span multiple lines, as long as all the lines are started by a greater than. Eg:
There once was a man from Nantucket,
Is far to inappropriate for me to post here in it's entirety
But I think you get the gist
- Lists
- Clearly this whole thing has been a list
- Lists work exactly how you think they do
- "* Item"
- "* Item the second"
- "1. Item 1"
- "2. Item 2"
- If you want sub-items then you put more indentation before your number or asterisk
- It's important to remember to put a space after your number or asterisk or it doesn't count
- Soft Breaks
- Ever want a new line after a line of text? Markdown makes that super unintuitive!
- Only one new line doesn't give you a new line at all
- But two new lines gives you...two new lines! WTF Markdown?!
- The way around this is after the line that you want to end but before the new line, add two spaces. You can see this in my list where I talk about links with the Reference location and the line about the man from Nantucket being inappropriate. Unintuitive, but once you figure it out, very handy.