Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mumimal

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mumimal

Mumimal is a mumi minimal blog generator.

  • 0.4.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Mumimal

CircleCI

Mumi and minimal blog engine.

Thin, fast and extendable.

Install

# use yarn
yarn add mumimal

# or use npm
npm install mumimal

Usage

CLI

# create post file
mumimal --post "My new post title"

# build blog
mumimal

# or, build with custom config
mumimal --config config.js

Use module

const { mumimal } = require('mumimal');
const config = {
  //...
}
mumimal(config).then(...)

Blog Structure

Project structure should look like

├── layouts/
│   ├── index.ejs
│   └── post.ejs
├── posts/
│   ├── 2020-02-02-my-post-1.md
│   └── 2020-03-24-my-post-2.md
├── config.js
├── dist/
└── static/
  • All files inside static would be copy to dist.
  • Mumimal builds: index, posts, rss and sitemap.

See example project.

Index

When rendering index, there are: site (site config) and

  • site: site config
  • posts: meta data of each posts

For example, you can use them like

<% posts.forEach(post => { %>
  <header>
    <h3>
      <%= post.dateStr %>
    </h3>
    <h2>
      <a href="<%= post.link %>">
        <%= post.title %>
      </a>
    </h2>
  </header>
<% }) %>

To read post content when building index:

<% const { content } = funcs.readPostSrc(post.postName) %>

Post

When rendering index, there are:

  • site: site config
  • meta: meta data of this post
  • content: html converted from markdown

For example, you can use them like

<% posts.forEach(post => { %>
<head>
  <title>Site Name | <%= meta.title %></title>
</head>
<body>
 <div class="tags"><%= meta.tags.join(', ') %></dib>
  <article>
    <%- content %>
  </article>
</body>

And post markdown should in this format

---
title: My Post Title
tags: tag1 tag2
---

Text content in [markdown](/markdown.html)

Configuration

Use mumimal --config config.js to apply custom config.

// example config.js
const config = {
  site: {
    url: 'https://github.com/yourName/',
    title: 'My Cool Blog'
  },
  feed: {
    title: 'My Cool Blog',
    description: 'This is an apple',
    image: `https://somewhere.example.com/logo.png`,
    categories: ["Tech", "Node.js"]
  },
  build: {
    minify: true,
    minifyOptions: {},
  }
  afterBuild: (context) => {
    console.log(context)
  }
}
module.exports = { config }

What is Mumi

Also known as "姆咪" (Chinese) and "ムミ" (Japanese), .

A characters of Battle Girl High School (バトガ).

Her name is Michelle Watagi (綿木 ミシェル). But in Taiwan, we all call her Mumi.

Keywords

FAQs

Package last updated on 14 Jul 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc