Giter Club home page Giter Club logo

hope-in-a-box-book-list's Introduction

Books Page for Hope in a Box

This is a custom Squarespace infrastructure for Hope in a Box's website.

About

Hope in a Box is a non-profit dedicated to helping teachers at rural and/or low-income schools include LGBTQ+ books in their classroom. This infrastructure helps teachers browse Hope in a Box's curated list of 100 inclusive books with an interactive page for searching and filtering books). We do this by generating a static HTML page using pre-scraped data, without the use of any database or backend.

Repository Structure

The structure of this repository adheres to Squarespace's template format, which is specified here. The important files are:

  • pages/browse-books.page: the HTML and CSS for the book list page.
  • scripts/booklist-data.js: a pre-generated JSON file masquerading as a JS file that contains data for all books.
  • scripts/inflate-booklist.js: a script that ingests data from booklist.js and inflates the page.

The book list page's search functionality uses fuzzyset by Glen Chiacchieri.

Instructions for Pushing to Squarespace

  1. Clone this repository to a local machine.
  2. Push this repository to the remote address as specfied by your own Squarespace site.

Updating the Book List Data

  1. Run node fetch-booklist-data.mjs to scrape book data from a database or a spreadsheet into the format as specified in scripts/booklist-data.js. This script uses private keys that are not included in the repository. If you would like to use the fetching script with your own spreadsheet, you'll need to create a developer key for the Google Sheets API and follow the endpoint here. If you would like to use our data, please get in touch.
  2. Ensure that assets/book-covers/ contains the covers of every book, formatted in kebab case.
  3. Push the repository to the Squarespace remote.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.