Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

This package has been deprecated

Author message:

old

squarespace-yui-block-initializers

0.1.2 • Public • Published

squarespace-yui-block-initializers

A collection of initializers for Squarespace YUI blocks.

About

After having spent way too much time figuring out how to initialize different blocks in Squarespace projects, this has happened. The primary use-case for these methods is due to asynchronous web app routing and ajax content loading. Obviously, the issue with Squarespace is that when you do this the new content doesn't get any of its blocks initialized. Based on project needs thus far, these are the ones I have figured out. On top of that, I pulled some from this resource by this guy to add as well. I'm excluding the lightbox initializers until I can determine whether or not there is a lighter way to hit those or not. Submissions for others to be added are more than welcome :)

Installation

npm install squarespace-yui-block-initializers --save-dev

Usage

# CommonJS
var sqs = require( "squarespace-yui-block-initializers" );

# ES6 Module
import "node_modules/squarespace-yui-block-initializers/sqs";

Methods

  • initVideo()
  • initAudio()
  • initCommerce()
  • initImages()
  • initGallery()
  • initMap()
  • trackPage( id )

Pull Requests

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Keywords

none

install

npm i squarespace-yui-block-initializers

Downloadsweekly downloads

0

version

0.1.2

license

MIT

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar