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

@hyperobjekt/cms-config

v3.0.0

Published

This repository has default configuration for pages and folder collections for use with `gatsby-theme-hypersite`.

Downloads

54

Readme

Netlify CMS Configuration Modules

This repository has default configuration for pages and folder collections for use with gatsby-theme-hypersite.

Getting started

In order to use this config, you must configure the gatsby netlify CMS plugin for manual initialization.

gatsby-config.js

{
  resolve: "gatsby-plugin-netlify-cms",
  options: {
    manualInit: true,
    modulePath: `${__dirname}/src/cms/cms.js`,
  },
},

then, in your cms.js add your configuration:

src/cms/cms.js

import CMS from "netlify-cms-app";
import { config, createFolderCollection } from "@hyperobjekt/cms-config";

window.CMS_MANUAL_INIT = true;

CMS.init({
  config: {
    load_config_file: false,
    // remember to run npx netlify-cms-proxy-server if running locally
    local_backend: process.env.CI !== true,
    backend: {
      name: "git-gateway",
      repo: "YOUR_GIT_REPO",
      branch: "YOUR_CMS_BRANCH",
    },
    media_folder: "/static/images",
    public_folder: "/images",
    collections: [
      createFolderCollection({
        label: "Pages",
        folder: "content/pages",
      }),
    ],
  },
});

You now have a functioning CMS for editing site config + pages!

Static Config

This package contains static configuration objects for frontmatter used in gatsby-theme-hypersite.

  • src/config: contains configuration objects for site metadata config
  • src/partials: contains configuration for page frontmatter (seo, name, embeddedImages, store, etc.)

Utility Functions

A few utility functions are provided to help simplify file and folder configuration creation.

createFile(config, options)

Returns a file configuration for a page to use within a file collection.

Params

  • config: a folder collection configuration. at minimum, it should have label and file keys.
  • options:
    • mergeFields: boolean indicating if fields in the config should be merged with the base config (true), or if they should be replaced (false).
    • fieldOverrides: contains an object with properties corresponding to field names, and values that consist of value overrides for the corresponding field config.

createFileCollection(config)

Returns a file collection configuration based on the provided config.

Params

  • config: a folder collection configuration. at minimum, it should have label and files keys.

createFolderCollection(config, options)

Returns a folder collection configuration based on the provided config and options.

Params

  • config: a folder collection configuration. at minimum, it should have label and folder keys.
  • options:
    • mergeFields: boolean indicating if fields in the config should be merged with the base config (true), or if they should be replaced (false).
    • fieldOverrides: contains an object with properties corresponding to field names, and values that consist of value overrides for the corresponding field config.