hexo-renderer-markdown-noop
v1.0.0
Published
A noop renderer for markdown files in Hexo.
Readme
hexo-renderer-markdown-noop
A noop renderer for markdown files in Hexo.
Installation
npm install hexo-renderer-markdown-noop
yarn add hexo-renderer-markdown-noop
pnpm add hexo-renderer-markdown-noopWhat is this?
Hexo is one of the fastest Node.js static site generators, capable of generating thousands of pages within seconds without multithreading.
Under the hood, Hexo is powered by its powerful JSON-based database warehouse. Alongside Hexo's powerful API, you can use Hexo as a headless CMS, and connect it with your favorite frameworks like Next.js, Nuxt.js, SvelteKit, and more.
Hexo provides two official Markdown renderers: hexo-renderer-marked and hexo-renderer-markdown-it. The Hexo community also builds other powerful Markdown renderers. They all can turn markdown files into HTML strings.
However, when using Hexo as a headless CMS, you may want Hexo to skip the "markdown -> HTML string" step and process the raw markdown content yourself with your framework, e.g., turn markdown into JSX within React Server Components to use it in Next.js.
This is where hexo-renderer-markdown-noop comes in. It registers itself as a markdown renderer for Hexo, which allows Hexo to recognize markdown files under your source/_posts directory, but it simply returns the raw markdown content as is. This allows you to read the raw markdown content with the .content property of Hexo's post object w/o Hexo trying to convert it into an HTML string.
License
hexo-renderer-markdown-noop © Sukka, Authored and maintained by Sukka with help from contributors (list).
Personal Website · Blog · GitHub @SukkaW · Telegram Channel @SukkaChannel · Twitter @isukkaw · Keybase @sukka
