Rename ZEIT Now to Vercel (#113)

https://vercel.com/blog/zeit-is-now-vercel
This commit is contained in:
Steven 2020-04-23 18:53:55 -04:00 committed by GitHub
parent bce2922d67
commit e8d7693227
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 17 deletions

View File

@ -5,7 +5,7 @@ There are two pieces to `og-image` that are worth noting before you begin develo
1. The backend image generator located in [/api/index.ts](https://github.com/zeit/og-image/blob/master/api/index.ts)
2. The frontend inputs located in [/web/index.ts](https://github.com/zeit/og-image/blob/master/web/index.ts)
The Now 2.0 platform handles [routing](https://github.com/zeit/og-image/blob/master/now.json#L6) in an elegate way for us so deployment is easy.
Vercel handles [routing](https://github.com/zeit/og-image/blob/master/now.json#L6) in an elegate way for us so deployment is easy.
To start hacking, do the following:

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2019 ZEIT, Inc.
Copyright (c) 2019-2020 Vercel, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
<a href="https://zeit.co/new/project?template=zeit/og-image"><img width="128" src="https://zeit.co/button" align="right"></a>
<a href="https://vercel.com/new/project?template=zeit/og-image"><img width="128" src="https://vercel.com/button" align="right"></a>
# [Open Graph Image as a Service](https://og-image.now.sh)
@ -32,7 +32,7 @@ It looks like the following:
## Why use this service?
Read the [blog post](https://zeit.co/blog/social-og-image-cards-as-a-service) for more info on the "Why" part.
Read the [blog post](https://vercel.com/blog/social-og-image-cards-as-a-service) for more info on the "Why" part.
The short answer is that it would take a long time to painstakingly design an image for every single blog post. And we don't want the exact same image for every blog post because that wouldn't make the article stand out when it was shared to Twitter.
@ -59,14 +59,14 @@ You'll want to fork this repository and deploy your own image generator.
4. Make changes by swapping out images, changing colors, etc (see [contributing](https://github.com/zeit/og-image/blob/master/CONTRIBUTING.md) for more info)
5. Run locally with `now dev` and visit [localhost:3000](http://localhost:3000) (if nothing happens, run `npm install -g now`)
6. Deploy to the cloud by running `now` and you'll get a unique URL
7. Setup [GitHub](https://zeit.co/github) to autodeploy on push
7. Setup [GitHub](https://vercel.com/github) to autodeploy on push
Alternatively, you can do a one-click to deploy with the button below.
[![Deploy to now](https://zeit.co/button)](https://zeit.co/new/project?template=zeit/og-image)
[![Deploy to Vercel](https://vercel.com/button)](https://vercel.com/new/project?template=zeit/og-image)
If you are using free ZEIT Now plan, you will need to remove all configuration inside `now.json` besides
`rewrites`. So your `now.json` should look like this:
If you are using the Hobby plan, you will need to remove all configuration inside `now.json` besides
`rewrites`. Your `now.json` should look like this:
```json
{
@ -76,9 +76,9 @@ If you are using free ZEIT Now plan, you will need to remove all configuration i
}
```
Once you have an image generator that sparks joy, you can setup [automatic Now + GitHub](https://zeit.co/github) deployments so that pushing to master is also deploying to production! 🚀
Once you have an image generator that sparks joy, you can setup [automatic GitHub](https://vercel.com/github) deployments so that pushing to master will deploy to production! 🚀
## Authors
- Steven ([@styfle](https://twitter.com/styfle)) - [ZEIT](https://zeit.co)
- Evil Rabbit ([@evilrabbit](https://twitter.com/evilrabbit_)) - [ZEIT](https://zeit.co)
- Steven ([@styfle](https://twitter.com/styfle)) - [Vercel](https://vercel.com)
- Evil Rabbit ([@evilrabbit](https://twitter.com/evilrabbit_)) - [Vercel](https://vercel.com)

View File

@ -1,7 +1,6 @@
{
"regions": ["all"],
"public": true,
"version": 2,
"functions": {
"api/**": {
"memory": 3008

View File

@ -4,9 +4,9 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="ie=edge" />
<meta name="og:image" content="https://og-image.now.sh/Open%20Graph%20Image%20as%20a%20Service.png" />
<meta name="og:image" content="https://og-image.now.sh/Open%20Graph%20Image%20as%20a%20Service.png?fontSize=95px" />
<title>Open Graph Image as a Service</title>
<meta name="description" content="A service to generate dynamic Open Graph images on-the-fly for the purpose of sharing a website to social media. Proudly hosted on ZEIT Now." />
<meta name="description" content="A service to generate dynamic Open Graph images on-the-fly for the purpose of sharing a website to social media. Proudly hosted on Vercel." />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="style.css" />
</head>
@ -30,7 +30,7 @@
<p>This is a service that generates dynamic <a href="http://ogp.me">Open Graph</a> images that you can embed in your <code>&lt;meta&gt;</code> tags.</p>
<p>For each keystroke, headless chromium is used to render an HTML page and take a screenshot of the result which gets cached.</p>
<p>Find out how this works and deploy your own image generator by visiting <a href="https://github.com/zeit/og-image">GitHub</a>.</p>
<footer>Proudly hosted on <a href="https://zeit.co/now">▲ZEIT Now</a></footer>
<footer>Proudly hosted on <a href="https://vercel.com/now">▲Vercel</a></footer>
</div>
</div>
</div>

View File

@ -142,14 +142,14 @@ const markdownOptions: DropdownOption[] = [
];
const imageLightOptions: DropdownOption[] = [
{ text: 'ZEIT', value: 'https://assets.zeit.co/image/upload/front/assets/design/zeit-black-triangle.svg' },
{ text: 'Vercel', value: 'https://assets.zeit.co/image/upload/front/assets/design/zeit-black-triangle.svg' },
{ text: 'Next.js', value: 'https://assets.zeit.co/image/upload/front/assets/design/nextjs-black-logo.svg' },
{ text: 'Hyper', value: 'https://assets.zeit.co/image/upload/front/assets/design/hyper-color-logo.svg' },
];
const imageDarkOptions: DropdownOption[] = [
{ text: 'ZEIT', value: 'https://assets.zeit.co/image/upload/front/assets/design/zeit-white-triangle.svg' },
{ text: 'Vercel', value: 'https://assets.zeit.co/image/upload/front/assets/design/zeit-white-triangle.svg' },
{ text: 'Next.js', value: 'https://assets.zeit.co/image/upload/front/assets/design/nextjs-white-logo.svg' },
{ text: 'Hyper', value: 'https://assets.zeit.co/image/upload/front/assets/design/hyper-bw-logo.svg' },
];