Advertising
Advertising

Use Markdown For Easy Web Writing

Use Markdown For Easy Web Writing

    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 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 Why Getting Things Done is the Best Productivity System For You To Automate or not to Automate Your Personal Productivity System

    Trending in Productivity

    1 How to Live up to Your Full Potential and Succeed in Life 2 Why To-Do Lists Don’t Work (And How to Change That) 3 8 Most Effective Games and Apps to Learn to Type Fast 4 10 Practical Ways to Improve Your Time Management Skills 5 4 Simple Steps to Brain Dump for a Smarter Brain

    Read Next

    Advertising
    Advertising
    Advertising

    Last Updated on September 11, 2019

    Why To-Do Lists Don’t Work (And How to Change That)

    Why To-Do Lists Don’t Work (And How to Change That)

    How often do you feel overwhelmed and disorganized in life, whether at work or home? We all seem to struggle with time management in some area of our life; one of the most common phrases besides “I love you” is “I don’t have time”. Everyone suggests working from a to-do list to start getting your life more organized, but why do these lists also have a negative connotation to them?

    Let’s say you have a strong desire to turn this situation around with all your good intentions—you may then take out a piece of paper and pen to start tackling this intangible mess with a to-do list. What usually happens, is that you either get so overwhelmed seeing everything on your list, which leaves you feeling worse than you did before, or you make the list but are completely stuck on how to execute it effectively.

    To-do lists can work for you, but if you are not using them effectively, they can actually leave you feeling more disillusioned and stressed than you did before. Think of a filing system: the concept is good, but if you merely file papers away with no structure or system, the filing system will have an adverse effect. It’s the same with to-do lists—you can put one together, but if you don’t do it right, it is a fruitless exercise.

    Why Some People Find That General To-Do Lists Don’t Work?

    Most people find that general to-do lists don’t work because:

    Advertising

    • They get so overwhelmed just by looking at all the things they need to do.
    • They don’t know how to prioritize the items on list.
    • They feel that they are continuously adding to their list but not reducing it.
    • There’s a sense of confusion seeing home tasks mixed with work tasks.

    Benefits of Using a To-Do List

    However, there are many advantages working from a to-do list:

    • You have clarity on what you need to get done.
    • You will feel less stressed because all your ‘to do’s are on paper and out of your mind.
    • It helps you to prioritize your actions.
    • You don’t overlook so many tasks and forget anything.
    • You feel more organized.
    • It helps you with planning.

    4 Golden Rules to Make a To-Do List Work

    Here are my golden rules for making a “to-do” list work:

    1. Categorize

    Studies have shown that your brain gets overwhelmed when it sees a list of 7 or 8 options; it wants to shut down.[1] For this reason, you need to work from different lists. Separate them into different categories and don’t have more than 7 or 8 tasks on each one.

    It might work well for you to have a “project” list, a “follow-up” list, and a “don’t forget” list; you will know what will work best for you, as these titles will be different for everybody.

    Advertising

    2. Add Estimations

    You don’t merely need to know what has to be done, but how long it will take as well in order to plan effectively.

    Imagine on your list you have one task that will take 30 minutes, another that could take 1 hour, and another that could take 4 hours. You need to know the moment you look at the task, otherwise you undermine your planning, so add an extra column to your list and include your estimation of how long you think the task will take, and be realistic!

    Tip: If you find it a challenge to estimate accurately, then start by building this skill on a daily basis. Estimate how long it will take to get ready, cook dinner, go for a walk, etc., and then compare this to the actual time it took you. You will start to get more accurate in your estimations.

    3. Prioritize

    To effectively select what you should work on, you need to take into consideration: priority, sequence and estimated time. Add another column to your list for priority. Divide your tasks into four categories:

    Advertising

    • Important and urgent
    • Not urgent but important
    • Not important but urgent
    • Not important or urgent

    You want to work on tasks that are urgent and important of course, but also, select some tasks that are important and not urgent. Why? Because these tasks are normally related to long-term goals, and when you only work on tasks that are urgent and important, you’ll feel like your day is spent putting out fires. You’ll end up neglecting other important areas which most often end up having negative consequences.

    Most of your time should be spent on the first two categories.

    4.  Review

    To make this list work effectively for you, it needs to become a daily tool that you use to manage your time and you review it regularly. There is no point in only having the list to record everything that you need to do, but you don’t utilize it as part of your bigger time management plan.

    For example: At the end of every week, review the list and use it to plan the week ahead. Select what you want to work on taking into consideration priority, time and sequence and then schedule these items into your calendar. Golden rule in planning: don’t schedule more than 75% of your time.

    Advertising

    Bottom Line

    So grab a pen and paper and give yourself the gift of a calm and clear mind by unloading everything in there and onto a list as now, you have all the tools you need for it to work. Knowledge is useless unless it is applied—how badly do you want more time?

    To your success!

    More to Help You Achieve More in Less Time

    Featured photo credit: Emma Matthews via unsplash.com

    Reference

    Read Next