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

@beyondwords/ghost-helper

v0.1.1

Published

BeyondWords Player integration for Ghost

Downloads

25

Readme

BeyondWords Ghost Helper

Build npm version

The Ghost Helper aims to make the integration with Ghosts easier by placing the BeyondWords Player in the right place for your theme and by selecting the correct content based on the page URL.

Documentation

  1. Getting started guide
  2. Ghost docs

Examples

Basic

<script async defer src="https://proxy.beyondwords.io/npm/@beyondwords/ghost-helper@latest/dist/umd.js"
  onload="new BeyondWords.GhostHelper({
    projectId: <ID>
  })">
</script>

Custom position

<script async defer src="https://proxy.beyondwords.io/npm/@beyondwords/ghost-helper@latest/dist/umd.js"
  onload="new BeyondWords.GhostHelper({
    projectId: <ID>,
    target: '.custom-target',
  })">
</script>

Segments Playback

<script async defer src="https://proxy.beyondwords.io/npm/@beyondwords/ghost-helper@latest/dist/umd.js"
  onload="new BeyondWords.GhostHelper({
    projectId: <ID>,
    assignMarkersEnabled: true,
    contentTarget: '.c-content'
  })">
</script>

Custom styles

<style>
    #beyondwords-player {
        margin: 16px 0;
    }
</style>
<script async defer src="https://proxy.beyondwords.io/npm/@beyondwords/ghost-helper@latest/dist/umd.js"
  onload="new BeyondWords.GhostHelper({
    projectId: <ID>
  })">
</script>

Player reference

const helper = new BeyondWords.GhostHelper({
  projectId: <ID>
});
await helper.playerLoader;
helper.player.addEventListener("<any>", console.log);

Other

For further customization you can refer to the BeyondWords Player documentation as the arguments of the GhostHelper constructor matches the BeyondWords Player constructor.

Development

Prerequisites

To work on the project you must have installed:

  • Node.js 16 or higher

  • npm 8 or higher

  • npm dependencies:

    npm install

Build

The build script will produce artifacts in the /dist directory, using Vite.

The build artifact is a single js file using the umd format.

npm run build

Lint

The lint script does a full static analysis of the source code, using ESLint.

npm run lint

Release

A new version of the Ghost Helper will be published automatically to NPM using the release Github Actions workflow on each new published Github release.

License

Copyright (c) 2023 Lstn Ltd (trading as BeyondWords). All rights reserved.

This repository and its contents, including but not limited to source code, documentation, and assets, are the sole property of BeyondWords and are protected by applicable copyright, trademark, and other intellectual property laws.

You are granted permission to use the player embed, SDK and the provided NPM package for your projects. No part of this repository may be otherwise reproduced, distributed, modified, or transmitted in any form or by any means, electronic or mechanical, without the prior written permission of BeyondWords, except for the purpose of submitting pull requests and contributing to the project.

Contributions in the form of pull requests are welcome; however, BeyondWords reserves the right to review, approve, or reject any modifications to the code.

For inquiries and permission requests, please contact [email protected].