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

gatsby-source-plone

v0.3.0

Published

Source plugin for pulling data into Gatsby from Plone sites

Downloads

36

Readme

Build Status Gitter chat

gatsby-source-plone

Source plugin for pulling data into Gatsby from Plone sites using plone.restapi.

Full documentation.

Install

npm install --save gatsby-source-plone

How to use

// In your gatsby-config.js
plugins: [
  {
    resolve: `gatsby-source-plone`,
  },
];

How to query

You can query nodes created from Plone like the following:

{
  allPloneDocument {
    edges {
      node {
        title
        description
        text {
          data
        }
        ...
      }
    }
  }
}

or

{
  allPloneNewsItem {
    edges {
      node {
        title
        description
        ...
      }
    }
  }
}

Development

Code Checkout

Checkout sources from github:

git clone [email protected]:collective/gatsby-source-plone.git

Set up Node

Make sure you use the latest NodeJS LTS version (currently 8.11.1). We recommend to use nvm for local development.

Set up Docker

We use Docker for handling the backend plone.restapi, and so it's required to have docker-compose installed.

Build

Build project frontend:

make purge  # if you already put some data into plone site
make init-backend  # Feeding automatic data into the plone site
make build # this command build the frontend for this plugin

you will see a site running at localhost:8000 similar to https://collective.github.io/gatsby-source-plone/

Dev Environment

Watch changes in Gatsby development mode:

make watch

Build Gatsby:

make build

Serve Gatsby build:

make serve

Stop Plone API server (started by any of the above):

make stop-backend

Clean everything and reset the environment:

make purge

Tests

Run unit tests:

make test

Watch unit tests:

make watch-test

Run both unit tests and acceptance tests:

make test-all

This command will automatically fire up the Plone backend, build and start Gatsby and the execute the selenium-based acceptance tests.

Acceptance tests depend on currently available Plone backend content. Ensure that your Plone backend includes also the tested content with:

make import-fixture

or replace Plone backend content with the test data with:

make init-backend

Publish Markdown docs at ./docs into Plone backend with:

make publish-to-backend

and export Plone backend data into importable fixture (for CI) with:

make export-fixture

Prettier Configuration

This project uses Prettier for code formatting, the .prettierrc file contains the requisite custom settings the project

It's recommended that you setup Format on Save so that your editor takes care of this automatically for you. In Visual Studio Code this can be setup in project by adding the following to your Workspace settings (or in .vscode/settings.json), while having the VSCode plugin for Prettier installed:

{
  "editor.formatOnSave": true
}