• HOME
  • USER GUIDE
  • SHOWCASE
  • ABOUT
  • Getting Started

    Prerequisites

    a basic knowledge of Markdown and HTML syntax
    a basic knowledge of running CLI commands
    a recent version of npm installed
    Node.js v10.13.0 or higher installed

    1. Install MarkBind

    Run the following command to install MarkBind.

    $ npm install -g markbind-cli
    

    Next, run the command markbind. If MarkBind has been installed correctly, you should see the MarkBind ascii logo followed by a summary of MarkBind commands as the output.

    $ markbind
      __  __                  _      ____    _               _
     |  \/  |   __ _   _ __  | | __ | __ )  (_)  _ __     __| |
     | |\/| |  / _` | | '__| | |/ / |  _ \  | | | '_ \   / _` |
     | |  | | | (_| | | |    |   <  | |_) | | | | | | | | (_| |
     |_|  |_|  \__,_| |_|    |_|\_\ |____/  |_| |_| |_|  \__,_|
    
     v2.x.y
    Usage: ...
    

    2. Initialize a new Project (or Start with an existing Project)

     

    Navigate into an empty directory and run the following command to initialize a skeletal MarkBind site in that directory. It will create several new files in the directory e.g., index.md, site.json.

    $ markbind init
    

    You can add the --help flag to any command to show the help screen.
    e.g., markbind init --help

    The init command populates the project with the default project template. Refer to templates section to learn how to use a different template.

     

    Navigate to the project The directory that contains all the project files. It is also the directory in which the site.json configuration file is located.root directory.

    3. Preview the site

    Run the following command in the same directory. It will generate a website from your source files, start a web server, and open a live preview of your site in your default Browser.

    Live preview is:

    • Regeneration of affected content upon any change to .md, .mbd, .mbdf, .njk files ... anything your content depends on!source files, then reloading the updated site in the Browser.

    • Copying files that don't affect page generation (eg. images), but are used in the siteassets to the site output folder.

    Use the serve command to launch a live preview.

    $ markbind serve
    

    Do some changes to the index.md and save the file. The live preview in the Browser should update automatically to reflect your changes.

    To stop the web server, go to the console running the serve command and press CTRL + C (or the equivalent in your OS).

    4. Next steps

    1. Update the content of your site. More info can be found in the User Guide: Authoring Contents section
    2. Deploy your site. More info can be found in the User Guide: Deploying the Site section.