Skip to content
Permalink
Browse files

[examples] Adjust readmes and info endpoint (#3542)

* Adjust README links

* Change example info

* Fix id check
  • Loading branch information
AndyBitz committed Jan 10, 2020
1 parent 0c6c667 commit 4625f66ebd55511f12e8d9fca6df72986dcbc2db
Showing with 52 additions and 49 deletions.
  1. +7 −4 api/_lib/examples/github-repo-info.ts
  2. +1 −1 examples/amp/README.md
  3. +1 −1 examples/angular/README.md
  4. +1 −1 examples/assemble/README.md
  5. +1 −1 examples/aurelia/README.md
  6. +1 −1 examples/brunch/README.md
  7. +1 −1 examples/charge/README.md
  8. +1 −1 examples/create-react-app/README.md
  9. +1 −1 examples/create-react-app/src/App.js
  10. +1 −1 examples/custom-build/README.md
  11. +1 −1 examples/docusaurus/README.md
  12. +1 −1 examples/docz/README.md
  13. +1 −1 examples/docz/hello-world.mdx
  14. +1 −1 examples/eleventy/README.md
  15. +1 −1 examples/foundation/README.md
  16. +1 −1 examples/gatsby/README.md
  17. +1 −1 examples/gridsome/README.md
  18. +1 −1 examples/hexo/README.md
  19. +1 −1 examples/hugo/README.md
  20. +1 −1 examples/hyperapp/README.md
  21. +1 −1 examples/ionic-react/readme.md
  22. +1 −1 examples/jekyll/README.md
  23. +1 −1 examples/marko/README.md
  24. +1 −1 examples/mdx-deck/README.md
  25. +1 −1 examples/metalsmith/README.md
  26. +1 −1 examples/middleman/README.md
  27. +1 −1 examples/mithril/README.md
  28. +1 −1 examples/mkdocs/README.md
  29. +1 −1 examples/nextjs/README.md
  30. +1 −1 examples/nextjs/package.json
  31. +1 −1 examples/nuxtjs/README.md
  32. +1 −1 examples/pelican/README.md
  33. +1 −1 examples/polymer/README.md
  34. +1 −1 examples/preact/README.md
  35. +1 −1 examples/riot/README.md
  36. +1 −1 examples/saber/README.md
  37. +1 −1 examples/sapper/README.md
  38. +1 −1 examples/stencil/readme.md
  39. +1 −1 examples/storybook/README.md
  40. +1 −1 examples/svelte/README.md
  41. +1 −1 examples/svelte/src/App.svelte
  42. +1 −1 examples/umijs/README.md
  43. +1 −1 examples/vanilla/README.md
  44. +1 −1 examples/vue/README.md
  45. +1 −1 examples/vuepress/README.md
  46. +1 −1 examples/zola/README.md
@@ -44,16 +44,19 @@ export async function getGitHubRepoInfo(repo: Repo) {
branch: repo.branch,
};

const subdirPath = repo.repo + '/tree/' + repo.branch + '/';
const subdirPath =
repo.repo +
'/tree/' +
repo.branch +
'/' +
(data.id === 'zeit/now' ? 'examples/' : '');

if (repo.path.startsWith(subdirPath)) {
// subdir
data.subdir = repo.path.slice(subdirPath.length).split('/');
}

const isExamples = data.id === 'zeit/now-examples' || data.id === 'zeit/now';

if (isExamples && data.subdir) {
if (data.id === 'zeit/now' && data.subdir) {
// from our examples, add `homepage` and `description` fields
const example = data.subdir[0];
const exampleList = await getExampleList();
@@ -6,7 +6,7 @@ This directory is a brief example of an [AMP](https://amp.dev/) site that can be

Deploy your own AMP project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/amp)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/amp)

_Live Example: https://amp.now-examples.now.sh_

@@ -8,7 +8,7 @@ This directory is a brief example of an [Angular](https://angular.io/) app that

Deploy your own Angular project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/angular)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/angular)

_Live Example: https://angular.now-examples.now.sh_

@@ -6,7 +6,7 @@ This directory is a brief example of a [Assemble](http://assemble.io/) app that

Deploy your own Assemble project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/assemble)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/assemble)

_Live Example: https://assemble.now-examples.now.sh_

@@ -6,7 +6,7 @@ This directory is a brief example of an [Aurelia](https://aurelia.io/) app that

Deploy your own Aurelia project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/aurelia)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/aurelia)

_Live Example: https://aurelia.now-examples.now.sh_

@@ -6,7 +6,7 @@ This directory is a brief example of a [Brunch](https://brunch.io/) site that ca

Deploy your own Brunch project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/brunch)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/brunch)

_Live Example: https://brunch.now-examples.now.sh_

@@ -6,7 +6,7 @@ This directory is a brief example of a [Charge.js](https://charge.js.org/) site

Deploy your own Charge.js project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/charge)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/charge)

_Live Example: https://charge.now-examples.now.sh_

@@ -8,7 +8,7 @@ This directory is a brief example of a [React](https://reactjs.org/) app with [S

Deploy your own React project, along with Serverless Functions, with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/create-react-app-functions)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/create-react-app-functions)

_Live Example: https://create-react-app.now-examples.now.sh/_

@@ -28,7 +28,7 @@ function App() {
</h2>
<p>
<a
href="https://github.com/zeit/now-examples/tree/master/create-react-app"
href="https://github.com/zeit/now/tree/master/examples/create-react-app"
target="_blank"
rel="noreferrer noopener"
>
@@ -6,7 +6,7 @@ This directory is a brief example of using a Custom Build script that can be dep

Deploy your own Custom Built project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/custom-build)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/custom-build)

_Live Example: https://custom-build.now-examples.now.sh_

@@ -8,7 +8,7 @@ This directory is a brief example of a [Docusaurus](https://docusaurus.io/) site

Deploy your own Docusaurus project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/docusaurus)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/docusaurus)

_Live Example: https://docusaurus.now-examples.now.sh_

@@ -6,7 +6,7 @@ This directory is a brief example of a [Docz](https://www.docz.site/) site that

Deploy your own Docz project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/docz)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/docz)

_Live Example: https://docz.now-examples.now.sh_

@@ -7,4 +7,4 @@ route: /

I'm a documentation page, using MDX, created using [docz](https://docz.site) and deployed with [ZEIT Now](https://zeit.co/now)!

You can learn how to deploy a docz project from [the now-examples GitHub repository](https://github.com/zeit/now-examples/tree/master/docz)!
You can learn how to deploy a docz project from [the now-examples GitHub repository](https://github.com/zeit/now/tree/master/examples/docz)!
@@ -8,7 +8,7 @@ This directory is a brief example of a [Eleventy](https://www.11ty.io/) site tha

Deploy your own Eleventy project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/eleventy)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/eleventy)

_Live Example: https://eleventy.now-examples.now.sh_

@@ -6,7 +6,7 @@ This directory is a brief example of a [Foundation](https://foundation.zurb.com/

Deploy your own Foundation project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/foundation)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/foundation)

_Live Example: https://foundation.now-examples.now.sh_

@@ -8,7 +8,7 @@ This directory is a brief example of a [Gatsby](https://www.gatsbyjs.org/) app w

Deploy your own Gatsby project, along with Serverless Functions, with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/gatsby)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/gatsby)

_Live Example: https://gatsby.now-examples.now.sh_

@@ -8,7 +8,7 @@ This directory is a brief example of a [Gridsome](https://gridsome.org/) app tha

Deploy your own Gridsome project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/gridsome)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/gridsome)

_Live Example: https://gridsome.now-examples.now.sh_

@@ -8,7 +8,7 @@ This directory is a brief example of a [Hexo](https://hexo.io/) site that can be

Deploy your own Hexo project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/hexo)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/hexo)

_Live Example: https://hexo.now-examples.now.sh_

@@ -6,7 +6,7 @@ This directory is a brief example of a [Hugo](https://gohugo.io/) app that can b

Deploy your own Hugo project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/hugo)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/hugo)

_Live Example: https://hugo.now-examples.now.sh_

@@ -6,7 +6,7 @@ This directory is a brief example of a [HyperApp](https://github.com/jorgebucara

Deploy your own HyperApp project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/hyperapp)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/hyperapp)

_Live Example: https://hyperapp.now-examples.now.sh_

@@ -6,7 +6,7 @@ This directory is a brief example of an [Ionic React](https://ionicframework.com

Deploy your own Ionic React project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/ionic-react)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/ionic-react)

_Live Example: https://ionic-react.now-examples.now.sh_

@@ -6,7 +6,7 @@ This directory is a brief example of a [Jekyll](https://jekyllrb.com/) site that

Deploy your own Jekyll project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/jekyll)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/jekyll)

_Live Example: https://jekyll.now-examples.now.sh_

@@ -6,7 +6,7 @@ This directory is a brief example of a [Marko.js](https://markojs.com/) app that

Deploy your own Marko.js project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/marko)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/marko)

_Live Example: https://marko.now-examples.now.sh_

@@ -6,7 +6,7 @@ This directory is a brief example of a [mdx-deck](https://github.com/jxnblk/mdx-

Deploy your own mdx-deck project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/mdx-deck)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/mdx-deck)

_Live Example: https://mdx-deck.now-examples.now.sh_

@@ -6,7 +6,7 @@ This directory is a brief example of a [Metalsmith](https://metalsmith.io/) app

Deploy your own Metalsmith project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/metalsmith)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/metalsmith)

_Live Example: https://metalsmith.now-examples.now.sh_

@@ -6,7 +6,7 @@ This directory is a brief example of a [Middleman](https://middlemanapp.com/) si

Deploy your own Middleman project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/middleman)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/middleman)

_Live Example: https://middleman.now-examples.now.sh_

@@ -6,7 +6,7 @@ This directory is a brief example of a [Mithril](https://mithril.js.org/) app th

Deploy your own Mithril project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/mithril)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/mithril)

_Live Example: https://mithril.now-examples.now.sh_

@@ -6,7 +6,7 @@ This directory is a brief example of a [MkDocs](https://www.mkdocs.org/) site th

Deploy your own MkDocs project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/mkdocs)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/mkdocs)

_Live Example: https://mkdocs.now-examples.now.sh_

@@ -8,7 +8,7 @@ This directory is a brief example of a [Next.js](https://nextjs.org) app that ca

Deploy your own Next.js project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/nextjs)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/nextjs)

_Live Example: https://nextjs.now-examples.now.sh_

@@ -3,7 +3,7 @@
"description": "A Next.js starter app.",
"repository": {
"type": "git",
"url": "https://github.com/zeit/now-examples/tree/master/nextjs"
"url": "https://github.com/zeit/now/tree/master/examples/nextjs"
},
"license": "MIT",
"scripts": {
@@ -6,7 +6,7 @@ This directory is a brief example of a [Nuxt.js](https://nuxtjs.org) app that ca

Deploy your own Nuxt.js project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/nuxtjs)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/nuxtjs)

_Live Example: https://nuxtjs.now-examples.now.sh_

@@ -6,7 +6,7 @@ This directory is a brief example of a [Pelican](https://docs.getpelican.com/en/

Deploy your own Pelican project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/pelican)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/pelican)

_Live Example: https://pelican.now-examples.now.sh_

@@ -8,7 +8,7 @@ This directory is a brief example of a [Polymer](https://www.polymer-project.org

Deploy your own Polymer project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/polymer)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/polymer)

_Live Example: https://polymer.now-examples.now.sh_

@@ -8,7 +8,7 @@ This directory is a brief example of a [Preact](https://preactjs.com/) app that

Deploy your own Preact project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/preact)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/preact)

_Live Example: https://preact.now-examples.now.sh_

@@ -6,7 +6,7 @@ This directory is a brief example of a [Riot.js](https://riot.js.org/) app that

Deploy your own Riot.js project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/riot)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/riot)

_Live Example: https://riot.now-examples.now.sh_

@@ -8,7 +8,7 @@ This directory is a brief example of a [Saber](https://saber.land) site that can

Deploy your own Saber project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/saber)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/saber)

_Live Example: https://saber.now-examples.now.sh_

@@ -6,7 +6,7 @@ This directory is a brief example of a [Sapper](https://sapper.svelte.dev/) app

Deploy your own Sapper project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/sapper)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/sapper)

_Live Example: https://sapper.now-examples.now.sh_

@@ -6,7 +6,7 @@ This directory is a brief example of a [Stencil](https://stenciljs.com/) app tha

Deploy your own Stencil project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/stencil)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/stencil)

_Live Example: https://stencil.now-examples.now.sh_

@@ -6,7 +6,7 @@ This directory is a brief example of a [Storybook](https://storybook.js.org/) ap

Deploy your own Storybook project with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/storybook)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/storybook)

_Live Example: https://storybook.now-examples.now.sh_

@@ -6,7 +6,7 @@ This directory is a brief example of a [Svelte](https://svelte.dev/) app with [S

Deploy your own Svelte project, along with Serverless Functions, with ZEIT Now.

[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now-examples/tree/master/svelte)
[![Deploy with ZEIT Now](https://zeit.co/button)](https://zeit.co/new/project?template=https://github.com/zeit/now/tree/master/examples/svelte)

_Live Example: https://svelte.now-examples.now.sh_

@@ -20,7 +20,7 @@
</h2>
<p>
<a
href="https://github.com/zeit/now-examples/tree/master/svelte-functions"
href="https://github.com/zeit/now/tree/master/examples/svelte-functions"
target="_blank"
rel="noreferrer noopener">
This project

1 comment on commit 4625f66

@now

This comment has been minimized.

Please sign in to comment.
You can’t perform that action at this time.