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 - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0

2

package.json
{
"name": "mumimal",
"version": "0.2.1",
"version": "0.3.0",
"description": "Mumimal is a mumi minimal blog generator.",

@@ -5,0 +5,0 @@ "main": "index.js",

# Mumimal
Mumi and minimal blog engine.
[![CircleCI](https://circleci.com/gh/wabilin/mumimal.svg?style=shield)](https://circleci.com/gh/wabilin/mumimal)
> Mumi and minimal blog engine.
Thin, fast and extendable.
## Install

@@ -15,4 +19,15 @@ ```sh

## Usage
Run `mumimal` or `mumimal --config config.js`
### Use command
`mumimal` or `mumimal --config config.js`
### Use module
```js
const { mumimal } = require('mumimal');
const config = {
//...
}
mumimal(config).then(...)
```
Your project structure should look like

@@ -30,4 +45,6 @@ ```

```
All files inside `static` would be copy to `dist`
- All files inside `static` would be copy to `dist`.
- Mumimal builds: index, posts, rss and sitemap.
### Index

@@ -54,2 +71,7 @@ When rendering index, there are: `site` (site config) and

To read post content when building index:
```ejs
<% const { content } = funcs.readPostSrc(post.postName) %>
```
### Post

@@ -68,2 +90,3 @@ When rendering index, there are:

<body>
<div class="tags"><%= meta.tags.join(', ') %></dib>
<article>

@@ -85,4 +108,4 @@ <%- content %>

### Config
Use `mumimal --config config.js` to apply custom config
### Configuration
Use `mumimal --config config.js` to apply custom config.

@@ -101,3 +124,10 @@ ```js

categories: ["Tech", "Node.js"]
},
build: {
minify: true,
minifyOptions: {},
}
afterBuild: (context) => {
console.log(context)
}
}

@@ -115,4 +145,1 @@ module.exports = { config }

But in Taiwan, we all call her Mumi.
## TODO
- [ ] get posts content in index
// @ts-check
const ejs = require('ejs');
const { minify } = require('html-minifier-terser');
const { readPostSrc } = require('./parsePosts');
const { minify } = require('html-minifier-terser');
const { INDEX_LAYOUT_PATH, DIST_INDEX_PATH } = require('./paths');

@@ -17,2 +18,5 @@ const { writeFile } = require('./file');

posts,
funcs: {
readPostSrc,
},
};

@@ -19,0 +23,0 @@

@@ -63,2 +63,3 @@ // @ts-check

* @property {Object} [build]
* @property {(context: Context) => Promise<void>} [afterBuild]
*/

@@ -125,3 +126,8 @@

return createSitemap(context);
await createSitemap(context);
const { afterBuild } = config;
if (typeof afterBuild === 'function') {
await afterBuild(context);
}
}

@@ -128,0 +134,0 @@

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