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.

    5 Project Management Tools to Get Your Team on Track To Automate or not to Automate Your Personal Productivity System 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

    Trending in Productivity

    1 9 Things Successful People Do To Always Get What They Want 2 Top 10 Reasons Why People Don’t Reach Their Goals 3 10 Best Task List Apps to Boost Productivity in 2020 4 10 Practical Ways to Improve Time Management Skills 5 Why Self Development Should Be On Your Life Goals List

    Read Next

    Advertising
    Advertising
    Advertising

    Last Updated on May 28, 2020

    9 Things Successful People Do To Always Get What They Want

    9 Things Successful People Do To Always Get What They Want

    One of the best decisions I’ve ever made was to take on the job of hosting my own weekly radio show. My radio show is about finding some of the most successful people in the world and bringing them on my show to ask them about what they did to become so successful in life and business.

    In this article, I’m going to share with you some of the key takeaways I’ve picked up from talking to – and reading about – thought leaders from various fields about the things successful people do. Here, you can get some insights on how to get what you want.

    Ready to dive in? Let’s go.

    1. They Know What They Want

    The first and most important thing that successful people do to always get what they want is so simple that most people forget about it: they figure out what they actually want.

    When you know what you want, you will also know how to get what you want. If you’re unsure about what you want in life and business, I’d suggest picking up some career and self-improvement books to help you gain some clarity and focus.

    2. They Are Assertive

    Successful people know that they need to be both bold and sincere. Balancing these two characteristics is the essence of assertiveness.

    Advertising

    Oh, and by the way – being assertive is not a natural talent someone is born with. Assertiveness is a learned skill and anyone can do it, including you!

    3. They Learn

    You may have heard of the old saying, “great leaders are readers”. For the most part, I’d say this is true.

    Let me give you an example. On my radio show, I regularly ask successful people about their habits that lead to success. Do you want to know something really neat? Every single one of them reads books.

    Successful people read and learn as much as they can about what they want so that they can get what they want. If you’re curious about how to get what you want, then start reading a book. If you’re low on time, subscribe to a book summary site to get the core concepts of the books in your industry quickly.

    4. They Make Things Meaningful

    One of the most powerful things successful people do to always get what they want is that they make things meaningful. That is, they ensure that whatever endeavor they decide to embark upon is meaningful to them (and not necessarily to anyone else). They know and understand that it’s only worth it if it matters.

    5. They Ask

    One big thing that successful people always do to get what they want is this: they ask.

    Advertising

    Most people are too shy to ask for what they really want. If you are too shy to ask, you may never know how to get what you want. So, don’t be like most people.

    Here’s an exercise you can do to get over it: next time you’re buying something, regardless of what it is, ask for a discount. Just do it. The worst-case scenario is that you’ll get a chuckle from the Barrista at Starbucks. The best-case scenario is that you’ll get comfortable with negotiating when it’s time to buy your next car.

    6. They Take Action

    Insight without action is useless. Successful people know that to always get what they want, they’ve got to take massive action.

    One of the most powerful exercises I’ve ever discovered is this: never leave the sight of a goal without taking some kind of action towards its achievement. In other words, as soon as you decide you want something or as soon as you set a goal of some kind, do something – anything – that shifts you closer towards getting it.

    7. They Use Their Time Wisely

    Have you ever heard of NET time? It stands for “No Extra Time”.

    For example: when you’re driving and sitting in traffic, are you listening to Mylie Cyrus? Or are you listening to an audiobook?

    Advertising

    Successful people take NET time seriously. Get yourself some audiobook so you can start listening to the best business and self-improvement books available – all while you’re on your way to work in the morning.

    8. They Choose to Lead

    You don’t need to have formal authority to become a leader. You just need to choose yourself. All successful people know this, and so should you. Knowing how to get what you want requires knowing how to lead the way for others and yourself.

    Don’t wait for anyone else to do it, because the truth is that most people want to be led anyway. So, just step up and claim authority. Be the leader you wish you always had.

    9. They Contribute

    Successful people know that to get what they want, they have to be willing to help other people get what they want.

    What happens when you stop doing your job? What happens when you stop caring about your schoolwork? What happens when you become emotionally disconnected from a relationship?

    You suffer – that’s what happens. Successful people know and understand that in order to succeed, they need to contribute. They need to add value to the lives of others. They need to do their best so that they can become the best.

    Advertising

    So, Now What?

    I hope this article has re-ignited the fire that you already had within you to be successful at any endeavor. The reason why I’m stressing the fact that you’ve already got everything you need to succeed and get what you want is that you wouldn’t be reading this if you weren’t already motivated to be successful.

    At the end of the day, however, all the insights in the world are worth nothing unless you combine them with action. When it’s all said and done, it’s your decision what you do with this list and how you apply it to your life and career.

    But if I may, here’s what I would suggest you consider as you get started doing the things to help you succeed:

    Review this list of the 9 things successful people do to always get what they want and then compare it with where you currently are at each one of these 9 things. Rate yourself in each one of the 9 things. Next, pick just ONE of them to work on every week.

    For example, if you find that you’d like to learn more about the business side of the company you work for, then go read the best business books to help you do that.

    Never stop learning. Always feed your mind with the knowledge you need to become as successful as possible within your area or industry. It doesn’t matter how busy you are. We’re all busy. Make the time to expand your knowledge.

    And remember: every key learning should be immediately followed with action.

    More Tips About Leading a Successful Life

    Featured photo credit: Austin Distel via unsplash.com

    Read Next