Skip to content
yambPublic

About

Yet Another Markdown (Mongo) Blog

Resources

Stars

2 stars

Watchers

2 watching

Forks

Repository files navigation

@yamb/core

npm version Build status Coverage status Dependency status

Yamb manages editable posts and lazy collections for websites, scripts and jobs. The application supplies storage and can add content preparation and renderers.

Quick start

Requires Node.js 26.13 or later. Install core and file storage.

pnpm add @yamb/core @yamb/storage-files

Use a trusted directory for ./posts.

import { yamb } from '@yamb/core';
import { files } from '@yamb/storage-files';

await using blog = yamb({
  storage: files({
    path: './posts'
  }),
  base: 'https://example.com/blog',
  timeZone: 'UTC'
});

await blog.open();

const post = await blog.create({
  title: 'Hello',
  text: 'A first draft.'
});

post.title = 'Hello, Yamb';
post.text = '**Hello**, world.';
post.tags.push('javascript');

await post.save();
await post.publish();

for await (const article of blog.published.tagged('javascript').recent(10)) {
  console.log(article.title, article.url().href);
}

Packages

Package Role
storage-files Markdown files with JSON frontmatter in a local directory
storage-mongo MongoDB with prepared collections and indexes
storage-sqlite Node's built-in SQLite with a prepared database
markdown Source → editable tokens → HTML → sanitized page/feed projections
microtypo Native MicroTypo adapter between HTML conversion and cleanup
render-html HTML view objects for individual posts
render-json Post/collection JSON views and JSON Feed 1.1
render-xml RSS 2.0 and Atom 1.0 feeds

Reference

Author

Alexey Simonenko

License

MIT. See LICENSE.

About

Yet Another Markdown (Mongo) Blog

Resources

Stars

2 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages