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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@mbertogliati/docsify-google-embed

v1.0.0

Published

Docsify plugin to embed Google Docs, Sheets, and Slides via fenced code blocks with optional metadata.

Readme

Docsify Google Embed Plugin

Embed Google Docs, Sheets, and Slides in your Docsify site using a simple fenced block with optional metadata.

  • Supports docs, sheets, and slides
  • Auto-detects type and ID from common Google URLs
  • Optional title/description (hidden by default), with toggles to show
  • Adjustable iframe height

Even if hidden, title and description are still added as data- attributes on the wrapper for automated tools.

Installation

Option 1: CDN (recommended)

Add the plugin JS and CSS after Docsify on your page. You can use unpkg or jsDelivr:

<!-- Docsify -->
<script src="https://cdn.jsdelivr.net/npm/docsify@4"></script>

<!-- Plugin CSS -->
<link rel="stylesheet" href="https://unpkg.com/@mbertogliati/docsify-google-embed/dist/google-embed.css"/>
<!-- or: <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mbertogliati/docsify-google-embed/dist/google-embed.css"/> -->

<!-- Plugin JS -->
<script src="https://unpkg.com/@mbertogliati/docsify-google-embed/dist/google-embed.js"></script>
<!-- or: <script src="https://cdn.jsdelivr.net/npm/@mbertogliati/docsify-google-embed/dist/google-embed.js"></script> -->

Option 2: NPM

npm i @mbertogliati/docsify-google-embed

Then include the files from node_modules/@mbertogliati/docsify-google-embed/dist/ in your Docsify HTML template:

<link rel="stylesheet" href="/node_modules/@mbertogliati/docsify-google-embed/dist/google-embed.css"/>
<script src="/node_modules/@mbertogliati/docsify-google-embed/dist/google-embed.js"></script>

Usage

In your markdown, add a fenced block with the language gembed (also accepts google-embed):

{
  "url": "https://docs.google.com/document/d/1y1HWBSPeNxqzETDntClR_aadtCB-T517tH2hYj11k3E/preview",
  "type": "docs",
  "title": "Product Requirements Document",
  "description": "High-level PRD covering scope, goals, and milestones.",
  "showTitle": false,
  "showDescription": false,
  "height": 600
}

Supported keys:

  • url (required): public/published Google URL
  • type (optional): docs | sheets | slides (auto-inferred from URL if omitted)
  • title (optional): metadata title
  • description (optional): metadata description
  • showTitle (optional, default false): set to true to display title
  • showDescription (optional, default false): set to true to display description
  • height (optional): iframe height in pixels (default 480)

Note: For best results, use published/preview/embed links. Private links will not render for viewers without access.

Google Doc Example

{
  "url": "https://docs.google.com/document/d/1y1HWBSPeNxqzETDntClR_aadtCB-T517tH2hYj11k3E/embed",
  "type": "docs",
  "title": "Product Requirements Document",
  "description": "High-level PRD covering scope, goals, and milestones.",
  "showTitle": false,
  "showDescription": false,
  "height": 600
}

Google Sheet Example

{
  "url": "https://docs.google.com/spreadsheets/d/1BxiMVs0XRA5nFMdKvBdBZjgmUUqptlbs74OgvE2upms/embed",
  "type": "sheets",
  "title": "Quarterly Metrics",
  "description": "Dashboard with KPIs and trend analysis.",
  "showTitle": true,
  "showDescription": true,
  "height": 500
}

Google Slides Example

{
  "url": "https://docs.google.com/presentation/d/1WrNnvt0GKyU4hORau10Ya_4aBNIwnHbX7vnyOYMLcRU/embed",
  "type": "slides",
  "title": "Roadmap Overview",
  "description": "Slide deck summarizing upcoming releases.",
  "showTitle": true,
  "showDescription": false,
  "height": 420
}

How it works

The plugin registers a Docsify hook in beforeEach that searches the markdown for fenced blocks that match:

```gembed
{ ...json... }

It parses the JSON and emits an HTML wrapper with an iframe pointing to an embed/preview URL. For `Docs`, `Sheets`, and `Slides`, the plugin will try to infer the type and the document ID from the `url` and convert it to an appropriate embed URL. If inference fails, it will fall back to the original URL.

## Styling

Basic styles are provided by `dist/google-embed.css`. You can override CSS variables:

- `--theme-border`
- `--theme-bg`
- `--theme-text`
- `--theme-muted`

## Development

- Source files: `src/`
- Distribution files: `dist/`
- Build: `npm run build`

## License

MIT