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 🙏

© 2024 – Pkg Stats / Ryan Hefner

docusaurus-notion-mdx-plugin

v0.1.9

Published

> Currently in the testing version, only supports docs. Will support multiple docs and blogs in the future.

Downloads

10

Readme

Currently in the testing version, only supports docs. Will support multiple docs and blogs in the future.

docusaurus-notion-mdx-plugin

docusaurus-notion-mdx-plugin enables you to use Notion as the editor for Docusaurus. By using Notion instead of raw markdown files, you eliminate the need to teach non-developers how to make git commits and pull requests. This simplifies collaboration and editing between users with less technical proficiency. docusaurus-notion-mdx-plugin allows non-technical team members to contribute content in a more user-friendly manner without having to learn complex version control processes.

Example Site: https://sillsdev.github.io/docu-notion-sample-site/

Instructions

1. In Notion, duplicate the docu-notion template

Go to this template page. Duplicate it into your own workspace. However, please note that you should not modify the fields of the database.

2. Create a Notion Integration

In order for docusaurus-notion-mdx-plugin to read your site via Notion's API, you need to create what Notion calls an "integration". Follow these instructions to make an integration and get your token. Remember to limit your integration to "READ" access.

Please remember your Notion Integration key, as it will be used for configuring the Docusaurus plugin later.

3. Connect your Integration

Go to the page that will be the root of your site. This page should have, as direct children, your "Outline" (required) and "Database" (optional) pages. Follow these instructions.

1702293207751.jpg

4. Set up your documentation site.

Install the plug-in

npm i docusaurus-notion-mdx-plugin

5. Modify the docusaurus.config.js file to configure plugins.

  plugins: [
    .......,
    ['docusaurus-notion-mdx-plugin',
      {
        notionAuth: 'Your docusaurus-notion-mdx-plugin Notion Integration Key.',
        databaseId: 'Notion template page database ID',
        lastSyncTime:"2023-12-07T10:32:23.473Z"
      }
    ],
  ],

How to obtain the database ID.

First, determine the id of your root page by clicking "Share" and looking at the url it gives you. E.g. https://www.notion.so/max-gao/ex0b17d232e34a81sdf72197c041108f means that the id is "ex0b17d232e34a81sdf72197c041108f".

lastSyncTime Field Description

This field represents the data you want to synchronize from this day onwards. Each subsequent run of the project will automatically update it. The corresponding field in the database is the last modified time, so any updated articles will also be synchronized here.

5. Add your page under the database.

When adding a page under the template database you copied, please pay attention to the fields of the database. Below are the meanings and explanations of the fields.

  • Name -> Docs title
  • DN - Short title -> Corresponding to the sidebar_label in Docusaurus docs front matter.
  • DN - Tags -> Corresponding to the tags in Docusaurus docs front matter.
  • DN - Docs classification -> Corresponding directory structure under "docs".
  • DN - Last edited time -> For synchronization

6. Run your docusaurus project

pnpm

pnpm start

View the files generated in the Docs directory.

7. Commit

Every time you run the project, the page will be updated. If you are using a CI system (such as Github Actions) for deployment, you can exclude submitting the page file.

Code blocks configuration

Some popular languages like Java, C#, or PHP are not enabled by default. Supported Languages

The MDX example

The MDX example

tips

The code block header in Docusaurus corresponds to the Caption in the notion code block

TODO

  • [ ] Reverse delete
  • [ ] Image Resources Sync
  • [ ] Elegant configuration category.json file

Please begin to enjoy

Release Nodes

Release 0.1.8 2023-12-12

  • Internal refactoring
  • Support for bold, underline, and other formatting.
  • Support hyperlinks in the block.
  • The unified directory structure is lowercase
  • Improve README.
  • Support code block title

Release 0.1.9 2023-12-14