GithubHelp home page GithubHelp logo

punchagan / artful-dodger Goto Github PK

View Code? Open in Web Editor NEW
17.0 4.0 6.0 839 KB

A Next.js site to host an art gallery using Google Spreadsheets and Google Drive as a backend

Home Page: https://punchagan.github.io/artful-dodger/

License: GNU General Public License v3.0

JavaScript 72.12% Shell 3.48% CSS 7.46% Python 11.94% SCSS 5.00%
nextjs static-site artgallery google-drive art-gallery next-js google-spreadsheet

artful-dodger's Introduction

The Artful Dodger

A Next.js site to host an art gallery using Google Spreadsheets and Google Drive as a backend.

Setup

Data Backend

The project can be powered by using a Google Spreadsheet that is viewable publicly. The demo site for this project is powered by the Google Sheet here. You can setup a similar document and make it "readable" by everyone with the link.

The example document uses images from the web (freely available on Pexels.com). But, you can use a Google Drive to upload the images. You can then either use a CDN like Cloudinary to automatically serve the images from Google Drive. Or download the images onto your web server into the directory from where you are serving the "built" site.

Configuration

To configure your site, copy the .env.local.default file to .env.local and edit it to point to your Google Spreadsheet and your CDN, if you are using one.

You can either use a free service like opensheet.vercel.app to convert the spreadsheet to a JSON end-point, or use the scripts/download-images script to download the metadata as a json file to public/metadata.json. You need to remove the METADATA_URL configuration from the .env.local file if you with to use the metadata.json file from your public/ directory.

Set IMAGE_CDN_PREFIX="" if you are using locally downloaded images on your server. Configure the thumbnails in the metadata document so that your images can be found at the location -- ${IMAGE_CDN_PREFIX}/image/${thumbnail}. You can use a ../ prefix on your thumbnails, if thumbnails don't live in an image directory.

ALso, remove the FORCE_CDN configuration, if you wish to not use CDN when developing locally.

Build & Deploy

yarn build builds the site. And yarn export would export the site to a static site.

See sample deploy scripts in the scripts/ directory to see how to deploy this site. You can see a demo site here.

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.