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 10 Good Habits To Have in Life To Be More Successful 2 30 Essential Core Values for Living the Life You Want 3 What Is Creativity? We All Have It, and Need It 4 How to Set Long Term Goals and Reach Success 5 Easily Distracted? Here’s How to Regain Your Focus

    Read Next

    Advertising
    Advertising
    Advertising

    Last Updated on January 24, 2020

    10 Good Habits To Have in Life To Be More Successful

    10 Good Habits To Have in Life To Be More Successful

    Habits are behaviors and patterns that you showcase by default. They enable you to carry out crucial activities like taking a shower, brushing your teeth, getting prepared for work.

    Interestingly, you follow this routine every day without considering them. Your unconscious habits create room for your brain to perform more advanced activities like problem-solving and choosing what book to read.

    Everyone has habits, and several of those habits are activated every day. I would classify them into three groups:

    • The first category includes the habits that you hardly notice as they have become a major part of your life- such as brushing teeth or wearing clothes.
    • The second category comprises good habits to have to be more successful-like eating healthily, exercising your body and reading books.
    • The last group consists of those habits that are harmful-like procrastinating, smoking or overeating.

    Habits are fundamental to becoming successful in life — or probably ending up a failure. Yet, as significant as habits are, some lack the knowledge of their capabilities.

    Habits are default activities that you engage in without giving an afterthought. They are automatic behavioral or mental activities. They help you carry out some actions without exerting too much energy. They simplify your life.

    Several people aspire to break bad habits. For instance, some people diet to stop overeating. They exercise to reduce obesity. Habits can hinder or impact your performance and productivity.

    That’s why I would share 10 good habits to have to be more successful in life.

    1. Begin Your Day with Meditation

    I recommend mindful meditation early in the morning. This practice helps you to be in the present moment. Consequently, it enables you to be mindful of challenging situations during the day.

    Different stressors may trigger as you go through the day; meditation helps you to remain calm before taking on the challenges.

    Personally, it helps me to devise strategies and think about ideas. Meditation is a good habit to have if you want to be connected to what’s significant in your life.

    Advertising

    2. Be Grateful for What You Have

    Sometimes, you waste time thinking of what’s not enough. You become immersed in those daunting challenges. However, challenges justify the presence of hope. When you have life, you have expectations. You will be free from challenges when you are six feet under. The only strategy you have to stop focusing on your problems is to focus on what you have.

    Gratitude is a time-tested pathway to success, health, and happiness. It redirects your focus to what you have from what you lack. Here’s what James Clear does every day,[1]

    “I say one thing I’m grateful for each day when I sit down to eat dinner.”

    3. Smile

    Can you pause and smile before you continue reading this?

    Now here is what just happened based on research conducted by the Association for Psychological Science; you set a pace for living a happier life when you smile. A genuine smile or what’s called a Duchenne smile is a good habit to have if you want to find spiritual, emotional and mental peace of mind.[2]

    Smiling induces the release of molecules that function towards fighting stress. The physiological state of your body determines the state of your mind. When you slouch or frown, your mind takes cues relating to unhappiness and depression. But, once you adjust yourself by putting up a smile, you begin to feel a new level of excitement and vibrancy.

    Can you smile again?

    4. Start Your Day with a Healthy Breakfast

    Starting your day with a healthy breakfast is a good habit to have and forms a crucial part of your life. Nevertheless, about 31 million Americans skip their breakfast each day.[3]

    If you are fed up hearing that breakfast is a crucial component of your day, you are only fighting the truth. If you want to become more successful, you need to ‘break your fast’ with healthy foods every morning.

    This habit is not difficult to form if you usually rush out the door every single morning. You can wake up earlier to fix yourself a meal so you don’t break down during the day.

    Advertising

    Get inspired by these 20 Healthy Breakfast Choices That Will Save You Time.

    5. Exercise Daily

    One of the good habits to have is to exercise your body and muscles every day. You don’t have to run a marathon or lift a weight. You only need to engage in less strenuous activities that oxygenate your blood and inject endorphins in your body.

    Jack Dorsey, the CEO of Twitter, classified exercise as a good habit to maximize his already jam-packed schedule.[4] He said,

    ‘I wake up by 5, meditate for 30 minutes, seven-minute workout times three, make coffee, and check-in.’

    He said on Product Hunt that he follows this routine every day as it gives him a steady-state that empowers him to be more productive.

    6. Manage Your Time as You Manage Your Finance

    Another good habit is the act of managing your time effectively. This goes a long way to impact your achievement.

    Time management is what separates the successful from the rest of the world as we all possess the same amount of time. How you leverage time determines your potential to succeed in life.

    So how do you manage your time effectively?

    Here’s Jack Dorsey’s recommendation in one of the Techonomy events;

    “I accomplish effective time management by theming my days and practicing self-discipline. These themes help me handle distractions and interactions. If a request or task does not align with the theme for that day, I don’t do it. This sets a cadence for everyone in the company to deliver and evaluate their progress”.

    And this is Dorsey’s weekly theme:[5]

    • Monday – Management
    • Tuesdays – Product
    • Wednesday – Marketing and growth
    • Thursdays – Developers and partnerships
    • Fridays – Culture and recruiting
    • Saturdays – Taking off
    • Sundays – Reflection, feedback, strategy, and preparing for Monday

    No wonder he was able to run two companies when others were struggling with one job.

    7. Set Daily Goals with Intentions

    Everyone has goals. It may relate to business or personal life. The truth is, we’re all tending towards a particular direction or another. Nevertheless, while long-term goals can offer you direction, it’s your daily goals that you establish that help you develop short-term goals that are essential for your success.

    Long-term goals may not give you the motivation you need to keep on. But when you implement your short-term milestones daily, you become fired up, and you can overcome the challenges that come with taking on bigger tasks.

    Here’s the main truth:Successful people don’t set goals without establishing their intentions. According to Jennifer Cohen of Forbes,[6]

    “What helps you to achieve your desired expectation is ensuring intentions accompany your daily goals.”

    Be intentional about your daily goals!

    8. Seek Inspiration

    It is usually difficult to be inspired for a considerable length of time. Sometimes, you become discouraged and feel like giving up on your goals when things are not working out as intended.

    A practical approach to stay on top of the situation is to inspire yourself each day. When you wake up in the morning after meditation, watch some motivational videos, and let the story of great leaders inspire you.

    Establish what Anthony Robbins called the ‘hour of power.’ Determine how many minutes you spend but make it count. Inspiration is the fuel for achievement because when you can conceive it in your mind, you can accomplish it.

    Advertising

    Michal Solowow, an investor and the founder of Mitex, a construction company puts it this way,[7]

    “The problems I encounter in everyday life motivates me to find solutions. This is a self-propelling mechanism. becoming a billionaire was never a motivating factor.”

    9. Save Steadily, Invest with All Prudence

    I can exhaust the good habits to have without talking about saving and investing. Most times, you overlook the significance of saving for the future when you are living in your present moment. According to CNBC, a $1000 emergency will propel several Americans into debt.[8]

    However, it is not enough to save, and you must invest your fund and be wise with it. If you pay attention to this now, you will set yourself for a life of success in the future. Ensure you save at least six months in your emergency account so you can be prepared for any future emergency.

    10. Budget and Track Your Spendings

    Benjamin Franklin warned of taking the precaution of little expenses. He said,

    “A small leak sinks a great ship.”

    It is easy to discard little expenses, but the truth is they always add up. This happens when you fail to budget.

    Budgeting is a good habit to have, which can impact your financial life significantly. The money you spend on extravagant lifestyles can be saved and invested in your future.

    The Bottom Line

    Endeavor to cultivate these good habits to have to become more successful as you journey through life. The quicker you cultivate them, the faster you achieve your goals.

    More About Habits

    Featured photo credit: Andrijana Bozic via unsplash.com

    Advertising

    Reference

    Read Next