npm install -g nirman
Create a directory for your site.
To create a new demo sample site as shown here
It will create a sample blog, generate static HTML and host it at
Ctrl+C to stop server
To generate and host a local server again, start
nirman without the –new option.
For more options on CLI:
Make changes to your contents, and those are reflected almost immediately without having to restart Nirman.
-<yourdirectory> ---- contents : All your website stuff goes in here. Arrange it the way you want it to be. ---- layouts : Templates for rendering pages. ---- config.yaml: Site configuration variables (Title/defaultLayout/About/etc)
Flexibility to arrange your site contents - the way you want it. All the stuff goes in “contents” directory.
Templating is similar to Jinja templates. Here we use Nunjucks templating
Additionaly, you can use your content files as your template - This helps avoid cases where you create a one line file just to point to another template file. This feature is optional.
Content metadata is available to your templates directly.
Example: If your directory is named “posts”, you can access the contents with Meta.posts.Elements
Markdown support via Showdown
You can simply add code here to create your own output.
Example: You want to create a page listing all the Categories in your content.
Front Matter - Configuration for a post/document can be placed as a front-matter at the top of the content file. You can add date, title, or anything that is supported as YAML. All this configuration is available to the Scope of the template
Code blocks within content ( <script type=“application/x-nirman-code” ).
Sometimes, you want a modified version of your data. For example: Metadata provides you the list of posts. However, in your content, you may require the post to be sorted/filtered by date/title/category/ (whatever) … Best is to leave this to you.
Simply create a code block within your content, get the items, and mention “scope.paginate(options)”. Then in your content use the paged-data to render content. You require ApplyTemplateToContent = TRUE to use this feature.
Detailed Documentation is not available yet
You can refer to the examples below for implementation details