Templates


Majibo uses Jinja as a templating engine.

Template

Default template is template.html but you can specify particular template for page by Template meta tag.

Variables

  • site.name - site (project) name
  • site.url - site URL
  • site.email - site contact e-mail
  • site.author.name - site author name
  • site.author.url - site author URL
  • site.author.email - site author contact e-mail
  • site.navigation - navigation object
  • site.description - site description
  • site.generator.name - Majibo name
  • site.generator.url - Majibo URL
  • site.generator.version - Majibo version
  • site.build_id - ID (timestamp) of build
  • page.url - page URL
  • page.id - page id (info.md = info)
  • page.is_index - true/false if page is index.md
  • page.type - open graph page type
  • page.language - page language
  • page.title - page title
  • page.description - page description
  • page.image - page image
  • page.author - page author
  • page.content - page content (HTML)
  • page.meta - original markdown metadata
  • link_base - link base folder (./)
  • assets.base - assets base folder (./assets/)
  • assets.stylesheet - site CSS file
  • assets.bootstrap.js - Bootstrap JS
  • assets.bootstrap.lightbox.js - BS5-lightbox JS

Bootstrap

Majibo uses Bootstrap CSS framework. Main Sass file is /assets/style.scss. This file includes Bootstrap files. You have to use Sass compiler to compile it to CSS file.

I am using Live Sass Compiler extension for VS Code.

How to use Live Sass Compiler in VS Code editor
How to use Live Sass Compiler in VS Code editor

Development mode

You can build project in development mode with this command: python build.py -p project_name -d

  • Project /dist/ folder is not removed and re-builded (files are just updated) so you can use Live Server extension for VS Code
  • Stylesheet is included directly from project's /asset/ folder do you can use Live Sass Compiler for live preview of CSS changes
How to use Live Server in VS Code editor
How to use Live Server in VS Code editor