Giter Club home page Giter Club logo

petsofnetlify's Introduction

petsofnetlify

This is a place where the Netlify team posts pictures of their pets.

Want to meet our friends? Head to petsofnetlify.com

A little note about this website

It's not very nice looking, but that's okay. It was a project that @philhawksworth dreamed up as a bit of an easter egg to support the launch of buying custom domains on Netlify. Then, @yourfrienderin begged him to teach her how to create a website in the process. You can make it better! Pull requests welcome <3

You are a Netlifier but your pet is missing?

Well that won't do. If your little friend is missing from this site please submit a pull request. But this site is just for the pets of people working at Netlify (and our beloved alumni) I'm afraid. To get your pet on here, you first have to join us

Contributing code or pets (!)

Please submit a pull request.

To add your pet, you need to give us a photo of your lovely pet, and their name. Add the details to the pets.json data file like this:

  {
    "name": "Your pet's name",
    "photo": "your-pets-photo.jpg"
  }

Remember to add a nice photo to the images folder.

Image optimisation

Although it is best not to add a very large image file to this repo, it's not critical to resize and optimize your image file since this site automatically serves the images via Cloudinary who resize, optimize and cache the images on their CDN automatically. (Thanks to their API and this little trick with Netlify Redirects)

Running locally

Want to tinker with the code?

# clone the repo
git clone [email protected]:netlify/petsofnetlify.git

# move into the project and install dependencies
cd petsofnetlify
npm install

# generate the site and watch for changes
npm start

# to test the redirects which proxy photo requests via Cloudinary run the build with Netlify CLI (you need your own free Cloudinary account to try this out on your own site)

# install the Netlify CLI
npm install netlify-cli -g

# run your project locally with Netlify Dev
ntl dev

petsofnetlify's People

Contributors

aitchiss avatar bhavana-netlify avatar charliegroll avatar dependabot[bot] avatar dianaperkinsdesign avatar emilieschario avatar fasterthanlime avatar jacklyn-net avatar jose-ledesma avatar jswimp avatar lesliecdubs avatar littlemarcus avatar lukeocodes avatar melvinpeepers avatar mheffner avatar mimato avatar minivan avatar nasivuela avatar paigeb avatar phedinkus avatar phenixrizen avatar philhawksworth avatar pieparker avatar rafaelconde avatar rjbeers avatar rocktronica avatar sdras avatar seldo avatar tiffafoo avatar verythorough avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

petsofnetlify's Issues

Update build image in Netlify UI

Recent PRs are failing:

2:30:17 PM: Build ready to start
2:30:17 PM: ---------------------------------------------------------------------
  UNSUPPORTED BUILD IMAGE

  The build image for this site uses Ubuntu 14.04 Trusty Tahr, which is no longer supported.

  To enable builds for this site, select a later build image at the following link:
  https://app.netlify.com/sites/clever-ardinghelli-cba588/settings/deploys#build-image-selection

  For more details, visit the build image migration guide:
  https://answers.netlify.com/t/end-of-support-for-trusty-build-image-everything-you-need-to-know/39004
  ---------------------------------------------------------------------

This is adorable and I love it but also I don't think the 404 handling for local/netlify dev images works

This is extremely NOT urgent please do not go out of your way to answer this.

I was playing around with this after I found it via CSS-Tricks and your tweet https://twitter.com/philhawksworth/status/1328340868726726656 about using Cloudinary and Netlify redirects, but with a 404 handler to re-serve local images as mentioned here https://twitter.com/philhawksworth/status/1328350104340848641.

But I'm not sure if it's working these days?

Reproduce

  1. Pull down this codebase
  2. npm install
  3. Add a new pet to pets.json along with a new image to src/images
  4. Run netlify dev

The new image 404s:

Screen Shot 2021-05-14 at 4 59 40 PM

I thought perhaps the netlify.toml needed to also account for the :height parameter in the requests, eg

[[redirects]]
  from = "/cloudinaried/:height/*"
  to = "/images/:splat"
  status = 404

But that didn't seem to work either.

Accessing the image directly when netlify dev is running at http://localhost:8888/images/the-new-doggo.jpg works as expected.

Has the syntax changed since this was originally written?

The idea of having 404s at Cloudinary fall back to the local, untransformed image is very appealing for local development and working with deploy previews, so I'm curious if I'm missing something here.

[security] Enforce Branch Protections

This is an issue generated by (for-internal-use-only)github-tools

Description

This repository has exceeded the development grace period, and the repo owner must decide if branch protections should be enforced.
If this repository houses code used in production in any capacity, branch protections must be enforced. Read (for-internal-use-only)here for more details

What do I need to do?

  • You can control whether or not branch protections are enforced by exclusively creating either of the labels:
    'enforce-branch-protections: true' or 'enforce-branch-protections: false'
  • If there is no branch protection control label, this issue will be recreated.
  • Once you have created either label, you can close this issue.
  • If you have issues or questions, please reach out to #internal-security-n-compliance on slack.

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.