• HOME
  • USER GUIDE
  • SHOWCASE
  • ABOUT
  • User Guide → Adding Pages

    Adding Pages

    It is easy to add files to a MarkBind site as any file inside the The directory that contains all the project files. It is also the directory in which the site.json configuration file is located.root directory becomes a part of the generated website.

    Example If you have a file tutorial/code.txt in your root directory, it will be available as <website-url>/tutorial/code.txt in the generated website.

    You can specify which files to be omitted from the site by using the ignore field in the site.config file as explained here.

    More importantly, .md and .mbd files can be transformed into html pages with matching names.

    Example <root>/tutorial/setup.md can be transformed into <website-url>/tutorial/setup.html

    Here are the steps to add a new page to your site:

    1. Add a .md (or .mbd) file anywhere inside the root directory.
    2. Update the pages attribute of the site.json to cover the new file, if necessary.
    3. Use the live preview to view the generated web page for the new file.

    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.