Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/teppeis/nextjs-kintone-blog-sample-ssg
https://github.com/teppeis/nextjs-kintone-blog-sample-ssg
Last synced: 11 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/teppeis/nextjs-kintone-blog-sample-ssg
- Owner: teppeis
- Created: 2021-01-11T04:57:16.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-10T12:24:44.000Z (almost 4 years ago)
- Last Synced: 2024-12-08T20:51:29.938Z (15 days ago)
- Language: TypeScript
- Homepage: nextjs-kintone-blog-sample-ssg.teppeis.vercel.app
- Size: 449 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# A blog example using Next.js and Kintone with SSG (Static Site Generation)
This example showcases Next.js's [Static Site Generation](https://nextjs.org/docs/basic-features/pages) feature using [Kintone](https://www.kintone.com/) as CMS and the data source. This is based on [blog-starter-typescript](https://github.com/vercel/next.js/tree/canary/examples/blog-starter-typescript).
The blog posts are stored in Kintone. If you add a new blog post or edit an existing post in Kintone, they trigger re-build of the entire blog, and they are available after that is complete.
## Deploy your own
Deploy the example using [Vercel](https://vercel.com):
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/git/external?repository-url=https://github.com/teppeis/nextjs-kintone-blog-sample-ssg&project-name=nextjs-kintone-blog-sample-ssg&repository-name=nextjs-kintone-blog-sample-ssg)
Required Environment variables:
- `KINTONE_BASE_URL`: Like `https://.cybozu.com`
- `KINTONE_APP_ID`: Your Kintone app for the blog. Like `123`
- `KINTONE_API_TOKEN`: API token with read permission for your appRequired Kintone app schema:
- `slug`: `SINGLE_LINE_TEXT`
- `title`: `SINGLE_LINE_TEXT`
- `date`: `DATETIME`
- `coverImage`: `SINGLE_LINE_TEXT`
- `excerpt`: `SINGLE_LINE_TEXT`
- `authorName`: `SINGLE_LINE_TEXT`
- `authorPicture`: `SINGLE_LINE_TEXT`
- `ogImage`: `SINGLE_LINE_TEXT`
- `content`: `MULTI_LINE_TEXT`### Trigger Vercel Deploy from Kintone Webhook
Kintone has [Webhook](https://get.kintone.help/k/en/user/app_settings/set_webhook/webhook.html) and Vercel has [Deploy Hooks](https://vercel.com/docs/more/deploy-hooks). By combining them, you can automate the build process.
1. Create a Deploy Hook in your Vercel project and get the URL
2. Create a Webhook in your Kintone app and set Vercel Deploy Hook URL in it