npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@amanda-mitchell/remark-bible-content

v2.0.0

Published

A Remark plugin that imports Bible content.

Downloads

38

Readme

@amanda-mitchell/remark-bible-content

This is a plugin for remark that detects paragraphs consisting of a single Bible reference and replaces them with the text of the passage.

In this example markdown document:

Proverbs 26:4-5 is a passage that has particularly special significance to me.

bible: Proverbs 26:4-5

The second paragraph would be replaced with the text of Proverbs 26:4-5 inside of a blockquote with a linked citation in a footer element.

Installation

yarn add @amanda-mitchell/biblia-api @amanda-mitchell/remark-bible-content

If you want to include quotations from the ESV, you'll also need to run

yarn add @amanda-mitchell/esv-api

Usage

import fetch from 'node-fetch';
import unified from 'unified';
import markdown from 'remark-parse';
import remarkRehype from 'remark-rehype';
import raw from 'rehype-raw';
import html from 'rehype-stringify';
import { createBibliaApiClient } from '@amanda-mitchell/biblia-api';
import { createEsvApiClient } from '@amanda-mitchell/esv-api'; // only required when using the ESV.
import { insertBibleContent } from '@amanda-mitchell/remark-bible-content';

const bibliaApiKey =
  'Go to https://bibliaapi.com/docs/API_Keys to generate an API key.';
const esvApiKey =
  'Go to https://api.esv.org/ to register an application and get an API key.';

const bibliaApi = createBibliaApiClient({ apiKey: bibliaApiKey, fetch });
const esvApi = createEsvApiClient({ apiKey: esvApiKey, fetch });

const processor = unified()
  .use(markdown)
  .use(insertBibleContent, {
    bibliaApi,
    esvApi, // only required when using the ESV.
    version: 'esv',
  })
  .use(remarkRehype, { allowDangerousHtml: true })
  .use(raw)
  .use(html);

const markdownDoc = `# Heading

bible: Prov 26:4-5

This passage is profound.`;

processor.process(markdownDoc).then(result => console.log(String(result)));

When run, this script will print

<h1>Heading</h1>
<blockquote>
<p class="block-indent"><span class="begin-line-group"></span>
<span id="p20026004_01-1" class="line"><b class="verse-num inline" id="v20026004-1">4&nbsp;</b>&nbsp;Answer not a fool according to his folly,</span><br><span id="p20026004_01-1" class="indent line">&nbsp;lest you be like him yourself.</span><br><span id="p20026005_01-1" class="line"><b class="verse-num inline" id="v20026005-1">5&nbsp;</b>&nbsp;Answer a fool according to his folly,</span><br><span id="p20026005_01-1" class="indent line">&nbsp;lest he be wise in his own eyes.</span><br></p><span class="end-line-group"></span>
<footer><a href="https://biblia.com/bible/esv/proverbs/26/4-5">Proverbs 26:4–5</a> (ESV)</footer>
</blockquote>
<p>This passage is profound.</p>

Options

bibliaApi

Required. This should be an instance of the client from @amanda-mitchell/biblia-api.

esvApi

Required when version is set to 'esv'. This should be an instance of the client from @amanda-mitchell/esv-api.

version

Optional. The Bible version whose content should be retrieved. This may be any version string supported by the Biblia API or the string 'esv'. Defaults to 'leb'.

skipReferenceDetection

Optional. When using @amanda-mitchell/remark-tag-bible-references, setting this to true will cause this plugin to only replace paragraphs that have already been tagged by that plugin. Defaults to false.

Open issues

The { allowDangerousHtml: true } option and rehype-raw plugins are required when transforming this plugin's output to HTML because existing plugins don't supply the means to preserve CSS when performing a roundtrip to Markdown and back to HTML. I would be happy to accept PRs that massage the API results into a more sensible Markdown AST, as long as it preserves the style info.