{"id":19168562,"url":"https://github.com/xanthous-tech/yuque-blog","last_synced_at":"2025-05-07T14:42:21.536Z","repository":{"id":39983406,"uuid":"264655183","full_name":"xanthous-tech/yuque-blog","owner":"xanthous-tech","description":"A Next.js site using new SSG support with a Yuque backed blog","archived":false,"fork":false,"pushed_at":"2023-01-06T06:09:08.000Z","size":740,"stargazers_count":9,"open_issues_count":13,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-19T23:32:00.119Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://yuque-blog.now.sh","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xanthous-tech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-17T12:01:37.000Z","updated_at":"2025-01-09T02:40:27.000Z","dependencies_parsed_at":"2023-02-05T12:15:49.853Z","dependency_job_id":null,"html_url":"https://github.com/xanthous-tech/yuque-blog","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xanthous-tech%2Fyuque-blog","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xanthous-tech%2Fyuque-blog/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xanthous-tech%2Fyuque-blog/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xanthous-tech%2Fyuque-blog/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xanthous-tech","download_url":"https://codeload.github.com/xanthous-tech/yuque-blog/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252897512,"owners_count":21821456,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T09:43:07.039Z","updated_at":"2025-05-07T14:42:21.392Z","avatar_url":"https://github.com/xanthous-tech.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 语雀NextJS博客\n\n这个博客生成器利用了 [语雀API](https://www.yuque.com/yuque/developer/api) 和 [NextJS的SSG功能](https://nextjs.org/docs/basic-features/data-fetching#getstaticprops-static-generation) 搭建，搭建部署之后不需要额外进行更新，只需要在语雀发布文章即可更新。\n\n博客的样式参考了 [etch主题](https://github.com/LukasJoswiak/etch) 。如果需要进行修改，可以fork之后使用 `styled-components` 自行替换对应的组件。\n\n# Demo\n\nhttps://yuque-blog.now.sh\n\n# 语雀的准备工作\n\n- 生成一个 [语雀API Token](https://www.yuque.com/yuque/developer/api#785a3731) \n- 创建一个知识库，并把路径设置成 `blog`。项目只拉路径为 `blog` 的知识库下面的全部已发布的文章\n\n# 本地开发\n\n首先复制 `.env.example` 到 `.env` 并把语雀的API Token填到 `YUQUE_TOKEN` 环境变量\n\n项目使用标准的NextJS开发流程。请查阅 [package.json](./package.json) 查看对应的 `scripts` 部分。\n\n# 部署\n\n[![Deploy to Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/xanthous-tech/yuque-blog/tree/master)\n\n推荐使用 [Vercel](https://vercel.com) （原Zeit NOW）进行部署。也可以选用 [腾讯云](https://github.com/serverless-components/tencent-nextjs) 或者 [阿里云](https://developer.aliyun.com/article/703315) 部署。\n\n部署时候需要根据云平台把语雀的API Token写到 `YUQUE_TOKEN` 的环境变量里。\n\n# 通过Webhook部署更新内容\n\n如果使用Vercel，或者其他支持Deploy Hook的云平台，推荐把 [博客知识库的Webhook](https://www.yuque.com/yuque/developer/doc-webhook) 配置成Deploy Hook。这样文章发布的时候可以自动部署。\n\n[以Vercel为例](https://vercel.com/docs/v2/more/deploy-hooks)\n\n# 开源证书\n\n[MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxanthous-tech%2Fyuque-blog","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxanthous-tech%2Fyuque-blog","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxanthous-tech%2Fyuque-blog/lists"}