Advertising

Use Markdown For Easy Web Writing

Use Markdown For Easy Web Writing
Advertising

    In listening to a bunch of Mac-centric podcasts lately, especially on workflows with the Mac, I have come across a tool that has been around for a while but is still not extremely popular with everyone. The tool is called Markdown and was created by John Gruber (Daring Fireball fame). The best way to explain it is the first paragraph from Markdown’s description on Mr. Gruber’s page:

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

    Yeah that is it in a nutshell. Before I jump in how to use this awesome tool on Mac and Windows, you may be wondering what the point of a tool like this actually is.

    What’s the point?

    At first I didn’t get the reason for using Markdown. Cool, you can transfer plain text stuff into HTML, but who the hell uses HTML anymore? Well, if you are a web writer you use HTML every single day whether you know it or not and if you have used WordPress or any other CMS for any length of time you have most likely had to tweak some HTML.

    If you are using WordPress there is nothing more agrevating than the WYSIWYG editor becoming too helpful with HTML tags in the background essentially destorying your formatting. Markdown can help you by transforming your text file into valid HTML. This allows you to paste your HTML into the HTML editor thus keeping your hard-won formatting. So nice.

    Advertising

    Also, there is something to say for document portability. HTML is an agnostic type of document markup and can be rendered in pretty much any crappy web browser. With the continued use of many different operating systems and devices out in the wild (iOS, Android, Blackberry, Windows, Mac, Linux, etc) the need for a standard format for text is highly needed. Markdown helps this along by allowing you to standardized all your note formatting without locking you in to some proprietary format. Just HTML and txt files.

    Let’s use it, shall we?

    Markdown is pretty darn easy to use and if you have any experience messing aroudn with software and HTML it will be a snap. Markdown is written in Perl, so if you don’t have Perl on your Windows machine you can download and install Strawberry Perl from here. If you are a Mac user, Perl is already installed for you.

    Next, go over to Daring Fireball and grab the Markdown.pl script, unzip it and put the Markdown.pl file in the directory that you will use to create and tranform your input text files.

    Now the fun part; learning how to use the syntax and creating your input text file.

    Markdown syntax

    I am going to briefly explain some of the most used syntax snippets that will get you off an running with Markdown. If you want the whole shebang, head on over to Daring Fireball to get a detailed list of all the niceties of the Markdown syntax.

    Headers

    Headers tags (h1, h2, h3, etc) are simple to create in your text document. To signify the h1 tag, “underline” the text with the ‘=’ sign:

    Advertising

    This is a h1 header
    ===================
    

    or for h2 use the ‘-‘ character:

    This is a h2 header
    -------------------
    

    You don’t need to put the same amount of ‘=’ or ‘-‘ characters under the heading; any number will due to produce the header tags.

    Bullets and lists

    I think in bullets and lists so it’s nice that Markdown handles them well. To insert a bullet append an asterisk to your line like this:

    * This is my point
    

    You can also use the ‘+’ or ‘-‘ characters as bullets.

    Ordered lists are easy too:

    1. Number one
    2. Number two
    3. Number three... now you got it!
    

    If you want multiple paragraphs under a bullet or number just indent the first line of each paragraph or indent all the lines if you want it to look nicer:

    Advertising

    1. Here is the first point that I am trying to make about numbered lists.
    
       By the way, I should probably mention this too.
    
    2. Next point
    

    Links

    One of my favorite things of Markdown is the easy way to insert links. First, bracket the word or phrase that you would like to be “clickable” and then follow that by a parenthesized URL:

    [click here](http://www.google.com/)
    

    Outputting to HTML

    After you have created your text file it is now time to pass it to the Markdown.pl script to produce your HTML output. If you didn’t create a text file to test, you can download the quick text file that I created to try it out.

    Place your text file in the same directory as the Markdown.pl script (you can pass the arguments with the correct path if you want to, this is just to make it easier). After that is done open up your command prompt in Windows or your terminal on your Mac or Linux and navigate to the folder with your input file.

    To create the output directly in the terminal window use the following command:

    perl Markdown.pl input.txt

    This will then parse the text file and output the valid HTML markup to the terminal. If you want the ouput to be directed towards a totally seperate HTML file type the following command:

    Advertising

    perl Markdown.pl input.txt > output.html

    This will create the HTML file output.html in whatever directory you are currently in.

    Wrapping it up

    Let me just say that if you think Markdown is interesting and understand the utility of it, I highly suggest that if you write anything you should write it with Markdow

    n syntax. It is cross-platform, open source, free, and compatible with everything. To me it is a game changer and I feel like I am a little behind in not utilizing it sooner. Once again, there is much more to the syntax than I have highlighted here, so check out Daring Fireball for more.

    By the way, I wrote this entire article using Markdown and if you want to see the syntax you can download it here.

    More by this author

    CM Smith

    A technologist and writer who shares advice on personal productivity, creativity and how to use technology to get things done.

    How to Beat Procrastination: 29 Simple Tweaks to Make 5 Project Management Tools to Get Your Team on Track To Automate or not to Automate Your Personal Productivity System Design Is Important: How To Fail At Blogging 7 Tools to Help Keep Track of Goals and Habits Effectively 6 Unexpected Ways Journaling Every Day Will Make Your Life Better

    Trending in Productivity

    1 7 Effective Ways To Motivate Employees in 2021 2 How a Project Management Mindset Boosts Your Productivity 3 5 Values of an Effective Leader 4 How to Motivate People Around You and Inspire Them 5 The Importance of Reminders (And How to Make a Reminder Work)

    Read Next

    Advertising
    Advertising

    Last Updated on July 21, 2021

    The Importance of Reminders (And How to Make a Reminder Work)

    The Importance of Reminders (And How to Make a Reminder Work)
    Advertising

    No matter how well you set up your todo list and calendar, you aren’t going to get things done unless you have a reliable way of reminding yourself to actually do them.

    Anyone who’s spent an hour writing up the perfect grocery list only to realize at the store that they forgot to bring the list understands the importance of reminders.

    Reminders of some sort or another are what turn a collection of paper goods or web services into what David Allen calls a “trusted system.”[1]

    A lot of people resist getting better organized. No matter what kind of chaotic mess, their lives are on a day-to-day basis because they know themselves well enough to know that there’s after all that work they’ll probably forget to take their lists with them when it matters most.

    Fortunately, there are ways to make sure we remember to check our lists — and to remember to do the things we need to do, whether they’re on a list or not.

    In most cases, we need a lot of pushing at first, for example by making a reminder, but eventually we build up enough momentum that doing what needs doing becomes a habit — not an exception.

    Advertising

    From Creating Reminders to Building Habits

    A habit is any act we engage in automatically without thinking about it.

    For example, when you brush your teeth, you don’t have to think about every single step from start to finish; once you stagger up to the sink, habit takes over (and, really, habit got you to the sink in the first place) and you find yourself putting toothpaste on your toothbrush, putting the toothbrush in your mouth (and never your ear!), spitting, rinsing, and so on without any conscious effort at all.

    This is a good thing because if you’re anything like me, you’re not even capable of conscious thought when you’re brushing your teeth.

    The good news is you already have a whole set of productivity habits you’ve built up over the course of your life. The bad news is, a lot of them aren’t very good habits.

    That quick game Frogger to “loosen you up” before you get working, that always ends up being 6 hours of Frogger –– that’s a habit. And as you know, habits like that can be hard to break — which is one of the reasons why habits are so important in the first place.

    Once you’ve replaced an unproductive habit with a more productive one, the new habit will be just as hard to break as the old one was. Getting there, though, can be a chore!

    Advertising

    The old saw about anything you do for 21 days becoming a habit has been pretty much discredited, but there is a kernel of truth there — anything you do long enough becomes an ingrained behavior, a habit. Some people pick up habits quickly, others over a longer time span, but eventually, the behaviors become automatic.

    Building productive habits, then, is a matter of repeating a desired behavior over a long enough period of time that you start doing it without thinking.

    But how do you remember to do that? And what about the things that don’t need to be habits — the one-off events, like taking your paycheck stubs to your mortgage banker or making a particular phone call?

    The trick to reminding yourself often enough for something to become a habit, or just that one time that you need to do something, is to interrupt yourself in some way in a way that triggers the desired behavior.

    The Wonderful Thing About Triggers — Reminders

    A trigger is anything that you put “in your way” to remind you to do something. The best triggers are related in some way to the behavior you want to produce.

    For instance, if you want to remember to take something to work that you wouldn’t normally take, you might place it in front of the door so you have to pick it up to get out of your house.

    Advertising

    But anything that catches your attention and reminds you to do something can be a trigger. An alarm clock or kitchen timer is a perfect example — when the bell rings, you know to wake up or take the quiche out of the oven. (Hopefully you remember which trigger goes with which behavior!)

    If you want to instill a habit, the thing to do is to place a trigger in your path to remind you to do whatever it is you’re trying to make into a habit — and keep it there until you realize that you’ve already done the thing it’s supposed to remind you of.

    For instance, a post-it saying “count your calories” placed on the refrigerator door (or maybe on your favorite sugary snack itself)  can help you remember that you’re supposed to be cutting back — until one day you realize that you don’t need to be reminded anymore.

    These triggers all require a lot of forethought, though — you have to remember that you need to remember something in the first place.

    For a lot of tasks, the best reminder is one that’s completely automated — you set it up and then forget about it, trusting the trigger to pop up when you need it.

    How to Make a Reminder Works for You

    Computers and ubiquity of mobile Internet-connected devices make it possible to set up automatic triggers for just about anything.

    Advertising

    Desktop software like Outlook will pop up reminders on your desktop screen, and most online services go an extra step and send reminders via email or SMS text message — just the thing to keep you on track. Sandy, for example, just does automatic reminders.

    Automated reminders can help you build habits — but it can also help you remember things that are too important to be trusted even to habit. Diabetics who need to take their insulin, HIV patients whose medication must be taken at an exact time in a precise order, phone calls that have to be made exactly on time, and other crucial events require triggers even when the habit is already in place.

    My advice is to set reminders for just about everything — have them sent to your mobile phone in some way (either through a built-in calendar or an online service that sends updates) so you never have to think about it — and never have to worry about forgetting.

    Your weekly review is a good time to enter new reminders for the coming weeks or months. I simply don’t want to think about what I’m supposed to be doing; I want to be reminded so I can think just about actually doing it.

    I tend to use my calendar for reminders, mostly, though I do like Sandy quite a bit.

    More on Building Habits

    Featured photo credit: Unsplash via unsplash.com

    Advertising

    Reference

    [1] Getting Things Done: Trusted System

    Read Next