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 Ways Journaling Will Change Your Life 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

    18 Ways to Train Your Brain to Learn Faster and Remember More 212 Secrets To a Super Productive Meeting You Should Know 3Powerful Daily Routine Examples for a Healthy and High-Achieving You 4The Importance of Time Management: 8 Ways It Skyrockets Your Success 5How to Prioritize Right in 10 Minutes and Work 10X Faster

    Read Next

    Advertising
    Advertising

    Last Updated on August 21, 2018

    8 Ways to Train Your Brain to Learn Faster and Remember More

    8 Ways to Train Your Brain to Learn Faster and Remember More

    You go to the gym to train your muscles. You run outside or go for hikes to train your endurance. Or, maybe you do neither of those, but still wish you exercised more.

    Well, here is how to train one of the most important parts of your body: your brain.

    When you train your brain, you will:

    • Avoid embarrassing situations. You remember his face, but what was his name?
    • Be a faster learner in all sorts of different skills. Hello promotion, here I come!
    • Avoid diseases that hit as you get older. No, thanks Alzheimer’s; you and I are just not a good fit.

    So how to train your brain to learn faster and remember more?

    1. Work your memory

    Twyla Tharp, a NYC-based renowned choreographer has come up with the following memory workout:

    When she watches one of her performances, she tries to remember the first twelve to fourteen corrections she wants to discuss with her cast without writing them down.

    If you think this is anything less than a feat, then think again. In her book The Creative Habit she says that most people cannot remember more than three.

    The practice of both remembering events or things and then discussing them with others has actually been supported by brain fitness studies.

    Memory activities that engage all levels of brain operation—receiving, remembering and thinking—help to improve the function of the brain.

    Advertising

    Now, you may not have dancers to correct, but you may be required to give feedback on a presentation, or your friends may ask you what interesting things you saw at the museum. These are great opportunities to practically train your brain by flexing your memory muscles.

    What is the simplest way to help yourself remember what you see? Repetition.

    For example, say you just met someone new.

    “Hi, my name is George”

    Don’t just respond with, “Nice to meet you”. Instead, say, “Nice to meet you George.” Got it? Good.

    2. Do something different repeatedly

    By actually doing something new over and over again, your brain wires new pathways that help you do this new thing better and faster.

    Think back to when you were three years old. You surely were strong enough to hold a knife and a fork just fine. Yet, when you were eating all by yourself, you were creating a mess.

    It was not a matter of strength, you see. It was a matter of cultivating more and better neural pathways that would help you eat by yourself just like an adult does.

    And guess what? With enough repetition you made that happen!

    Advertising

    But how does this apply to your life right now?

    Say you are a procrastinator. The more you don’t procrastinate, the more you teach your brain not to wait for the last minute to make things happen.

    Now, you might be thinking “Duh, if only not procrastinating could be that easy!”

    Well, it can be. By doing something really small, that you wouldn’t normally do, but is in the direction of getting that task done, you will start creating those new precious neural pathways.

    So if you have been postponing organizing your desk, just take one paper and put in its right place. Or, you can go even smaller. Look at one piece of paper and decide where to put it: Trash? Right cabinet? Another room? Give it to someone?

    You don’t actually need to clean up that paper; you only need to decide what you need to do with it.

    That’s how small you can start. And yet, those neural pathways are still being built. Gradually, you will transform yourself from a procrastinator to an in-the-moment action taker.

    3. Learn something new

    It might sound obvious, but the more you use your brain, the better its going to perform for you.

    For example, learning a new instrument improves your skill of translating something you see (sheet music) to something you actually do (playing the instrument).

    Advertising

    Learning a new language exposes your brain to a different way of thinking, a different way of expressing yourself.

    You can even literally take it a step further, and learn how to dance. Studies indicate that learning to dance helps seniors avoid Alzheimer’s. Not bad, huh?

    4. Follow a brain training program

    The Internet world can help you improve your brain function while lazily sitting on your couch. A clinically proven program like BrainHQ can help you improve your memory, or think faster, by just following their brain training exercises.

    5. Work your body

    You knew this one was coming didn’t you? Yes indeed, exercise does not just work your body; it also improves the fitness of your brain.

    Even briefly exercising for 20 minutes facilitates information processing and memory functions. But it’s not just that–exercise actually helps your brain create those new neural connections faster. You will learn faster, your alertness level will increase, and you get all that by moving your body.

    Now, if you are not already a regular exerciser, and already feel guilty that you are not helping your brain by exercising more, try a brain training exercise program like Exercise Bliss.

    Remember, just like we discussed in #2, by training your brain to do something new repeatedly, you are actually changing yourself permanently.

    6. Spend time with your loved ones

    If you want optimal cognitive abilities, then you’ve got to have meaningful relationships in your life.  Talking with others and engaging with your loved ones helps you think more clearly, and it can also lift your mood.

    If you are an extrovert, this holds even more weight for you. At a class at Stanford University, I learned that extroverts actually use talking to other people as a way to understand and process their own thoughts.

    Advertising

    I remember that the teacher told us that after a personality test said she was an extrovert, she was surprised. She had always thought of herself as an introvert. But then, she realized how much talking to others helped her frame her own thoughts, so she accepted her new-found status as an extrovert.

    7. Avoid crossword puzzles

    Many of us, when we think of brain fitness, think of crossword puzzles. And it’s true–crossword puzzles do improve our fluency, yet studies show they are not enough by themselves.

    Are they fun? Yes. Do they sharpen your brain? Not really.

    Of course, if you are doing this for fun, then by all means go ahead. If you are doing it for brain fitness, then you might want to choose another activity

    8. Eat right – and make sure dark chocolate is included

    Foods like fish, fruits, and vegetables help your brain perform optimally. Yet, you might not know that dark chocolate gives your brain a good boost as well.

    When you eat chocolate, your brain produces dopamine. And dopamine helps you learn faster and remember better. Not to mention, chocolate contains flavonols, antioxidants, which also improve your brain functions.

    So next time you have something difficult to do, make sure you grab a bite or two of dark chocolate!

    Now that you know how to train your brain, it’s actually time to start doing.

    Don’t just consume this content and then go on with your life as if nothing has changed. Put this knowledge into action and become smarter than ever!

    Featured photo credit: Unsplash via unsplash.com

    Read Next