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

    6 Unexpected Ways Journaling Every Day Will Make Your Life Better Why Getting Things Done is the Best Productivity System For You How to Beat Procrastination: 29 Ways to Beat It Once and for All To Automate or not to Automate Your Personal Productivity System Top 10 Productivity Tools to Help You Achieve 10x More in Less Time

    Trending in Productivity

    1 Don’t Think You’re a Creative Person? You Can Definitely Change That 2 11 Tactics on Increasing Brain Power, Memory, and Motivation 3 15 Ways to Practice Positive Self-Talk for Success 4 10 Hacks to Increase Your Brain IQ, Focus and Creativity 5 16 Productivity Secrets of Highly Successful People Revealed

    Read Next

    Advertising
    Advertising

    Last Updated on October 14, 2018

    Don’t Think You’re a Creative Person? You Can Definitely Change That

    Don’t Think You’re a Creative Person? You Can Definitely Change That

    Do you think of yourself as a creative person? Do you play the drums or do watercolor paintings? Perhaps compose songs or direct plays? Can you even relate to any of these so called ‘creative’ experiences?

    Many people have this common assumption that creativity is an inborn talent, whereby only a special group of people are inherently creative–everyone else just unfortunately does not have that special ability. But, this is far from the truth!

    So what is creativity?

    Everyone Can Be Creative!

    The fact is, that everyone has an innate creative ability. Despite what most people may think, creativity is a skill that everyone can learn. It’s a skill with huge leverage that allows you to generate enormous amounts of value from relatively little input. How is that so?

    You’ll have to start by expanding your definition of creativity. Creativity isn’t just about making art or ‘thinking out of the box’. Creativity at its heart, is being able to see things in a way that others cannot. It’s a skill that helps you find new perspectives to create new possibilities and solutions to different problems.

    So, if you encounter different challenges and problems that need solving on a regular basis, then creativity is an invaluable skill to have.

    Advertising

    Let’s say, for example, that you work in sales. Having creativity will help you to look for new ways to approach and reach out to potential customers. Or perhaps you’re a teacher. You have to constantly look for new ways to deliver your message and educate your students.

    How Creativity Really Works

    Let me break another misconception about creativity — which is that it’s only used to create completely “new” or “original” things. Again, this is far from the truth. Because nothing is ever completely new or original.

    Everything, including works of art, doesn’t come from nothing. Everything derives from some sort of inspiration. That means that creativity works by connecting things together in order to derive new meaning or value.

    From this perspective, you can see lots of creativity in action. In technology, Apple combines traditional computers with design and aesthetics to create new ways to use digital products. In music, a musician may be inspired by certain styles of music, instruments and rhythms to write a new song.

    All of these examples are about connecting different ideas, finding common ground amongst the differences, and creating a completely new idea out of them.

    Creativity Needs an Intention

    Another misconception about the creative process is that you can just be in a general “creative” state.

    Advertising

    Real creativity isn’t about coming up with “eureka!” moments for random ideas. Instead, to be truly creative, you need to have a direction. You have to ask yourself this question:

    “What problem are you trying to solve?”

    Only by knowing the answer to this question can you start flexing your creativity muscles.

    Often times, the idea of creativity is associated with the ‘Right’ brain, with intuition and imagination. Hence a lot of focus is placed on the ‘Right’ brain when it comes to creativity.

    But to get the most out of creativity, you need to utilize both sides of your brain, Right and Left, which means using the analytical and logical part of your brain, too.

    This may sound surprising to you, but creativity has a lot to do with problem solving. And, problem solving inherently involves logic and analysis. So instead of throwing out the ‘Left’ brain, full creativity needs them to work in unison.

    Advertising

    For example, when you’re looking for new ideas, your ‘Left’ brain will guide you to a place of focus, which is based on your objective behind the ideas you’re searching for. The ‘Right’ brain then guides you to gather and explore based on your current focus.

    And, when you decide to try out these new ideas, your ‘Right’ brain will give you novel solutions outside of the ones you already know. Your ‘Left’ brain then helps you evaluate and tune the solutions to work better in practice. So logic and creativity actually work hand in hand, and not one at the expense of the other.

    Creativity is a Skill

    At the end of the day, creativity is a skill. It’s not some innate or natural born talent that some have over others. What this means is that creativity and innovation can be practiced and improved upon systematically.

    A skill can be learned and practiced by applying your strongest learning styles. Want to know what your learning style is? Try this test.

    A skill can also be measured and improved through a Feedback Loop, and can be continuously upgraded over time by regular practice. Through regular practice, your creativity goes through different stages of proficiency. This means that you can become more and more creative!

    If you never thought that creativity was relevant to you, or that you don’t have a knack for being creative… think again! You can use creativity in any aspect of your life. In fact you should use it, as it will allow you to to break through your usual loop, get you out of your comfort zone, and inspire you to grow and try new things.

    Advertising

    Creativity will definitely give you an edge when you’re trying to solve a problem or come up with new solutions.

    Start Connecting the Dots!

    Excited to start honing your creativity? Here at Lifehack, we’ve got a wealth of knowledge to help. We understand that creativity is a matter of connecting things together in order to derive new meaning or value.

    So if you want to learn how to start connecting the dots, simply subscribe to our newsletter today. In it, you’ll find out how to make use of crucial skills that will push you towards a life transformation– one that you never thought possible. Your personal growth is our commitment.

    Featured photo credit: rawpixel via unsplash.com

    Read Next