{"id":15545702,"url":"https://github.com/davbree/happy-sycamore","last_synced_at":"2026-04-11T07:44:21.751Z","repository":{"id":140317378,"uuid":"321667842","full_name":"davbree/happy-sycamore","owner":"davbree","description":"Jamstack site created with Stackbit","archived":false,"fork":false,"pushed_at":"2020-12-15T12:56:26.000Z","size":673,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T08:42:45.381Z","etag":null,"topics":["gatsby","git","headless","jamstack","ssg","stackbit","static"],"latest_commit_sha":null,"homepage":"https://jamstack.new","language":"JavaScript","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/davbree.png","metadata":{"files":{"readme":"README-zh-Hans.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-15T12:56:16.000Z","updated_at":"2020-12-15T12:56:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"29418bb8-2035-4dc0-b4d6-c8e0329cc62c","html_url":"https://github.com/davbree/happy-sycamore","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/davbree/happy-sycamore","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davbree%2Fhappy-sycamore","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davbree%2Fhappy-sycamore/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davbree%2Fhappy-sycamore/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davbree%2Fhappy-sycamore/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davbree","download_url":"https://codeload.github.com/davbree/happy-sycamore/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davbree%2Fhappy-sycamore/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31673067,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T17:19:37.612Z","status":"online","status_checked_at":"2026-04-11T02:00:05.776Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["gatsby","git","headless","jamstack","ssg","stackbit","static"],"created_at":"2024-10-02T12:54:06.786Z","updated_at":"2026-04-11T07:44:21.734Z","avatar_url":"https://github.com/davbree.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Calpa 的技术博客脚手架\n\n[![GitHub license](https://img.shields.io/github/license/calpa/gatsby-starter-calpa-blog.svg)](https://github.com/calpa/gatsby-starter-calpa-blog/blob/master/LICENSE)\n[![Accept Pull Requests](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](https://github.com/calpa/gatsby-starter-calpa-blog/pulls)\n[![Twitter](https://img.shields.io/twitter/url/https/github.com/calpa/gatsby-starter-calpa-blog.svg?style=social)](https://twitter.com/intent/tweet?text=Wow:\u0026url=https%3A%2F%2Fgithub.com%2Fcalpa%2Fblog)\n[![Greenkeeper badge](https://badges.greenkeeper.io/calpa/gatsby-starter-calpa-blog.svg)](https://greenkeeper.io/)\n[![Build Status](https://api.travis-ci.org/calpa/gatsby-starter-calpa-blog.svg?branch=master)](https://github.com/calpa/gatsby-starter-calpa-blog/blob/master/.travis.yml)\n[![CodeFactor](https://www.codefactor.io/repository/github/calpa/gatsby-starter-calpa-blog/badge)](https://www.codefactor.io/repository/github/calpa/gatsby-starter-calpa-blog)\n\n[繁體中文](README-zh-Hant.md) | [简体中文](README-zh-Hans.md) | [English](README.md)\n\n![HomePage](https://i.imgur.com/6Xd4yVQ.png)\n\n透过这个腳手架，你可以快速建立一个如同 [Calpa's Blog](https://calpa.me) 的博客系统。\n\n## 功能\n\n### 系统架构\n\n1. GatsbyJS v2，更加快速\n1. Google Analytics\n1. 支持离线操作\n1. Web App Manifest\n1. Netlify 网站优化\n1. 精美评论区 (powered by [Gitalk](https://github.com/gitalk/gitalk))\n1. 高速解析 Markdown (基于[remarkable](https://github.com/jonschlinkert/remarkable))\n1. 支持站点地图\n\n### 设计\n\n1. 响应式设计\n1. 懒加载（图片） (基于 [lozad.js](https://github.com/ApoorvSaxena/lozad.js))\n1. 自动加载 Font Awesome (基于 [react-fontawesome](https://github.com/FortAwesome/react-fontawesome))\n1. 流畅滑动设计 (基于 [smooth-scroll](https://github.com/cferdinandi/smooth-scroll))\n1. 分页设计\n1. 展示博客系统的组件 (基於 [storybook](https://github.com/storybooks/storybook))\n\n### 数据来源\n\n1. 源自 [Contentful][1]，壹个灵活且易于使用的内容管理系统\n1. 经过系统更新后，你可以使用任意的数据库\n\n### 可自定的地方\n\n如果你觉得这个系统需要更加完善的话，你可以从下面的地方入手：\n\n1. 搜索引擎优化\n1. 使用 SCSS 来自定义样式\n1. 数据来源\n\n## 快速入门\n\n### 使用 Netlify 部署\n\n你可以使用以下按钮来构建和部署博客的一个副本：\n\n\u003ca href=\"https://app.netlify.com/start/deploy?repository=https://github.com/calpa/gatsby-starter-calpa-blog\" target=\"_blank\"\u003e\u003cimg src=\" https://www.netlify.com/img/deploy/button.svg\" alt=\"Deploy to Netlify\"\u003e\u003c/a\u003e\n\n在你点击上面的按钮之后，你就会赋予 Netlify 取得你的 Github 授权，以及选择仓库名称。 Netlify 会自动创建一个仓库，并且复制那里的文件。\n\n之后，它会自动构建和部署一个新的网站，为你带来一个完整的博客系统。\n\n你也可以使用 Contentful 作为你的内容管理系统。\n\n### 使用 Codesandbox 来写代码\n\n你可以使用以下按钮来尝试修改博客系统的代码：\n\n[![Edit blog](https://codesandbox.io/static/img/play-codesandbox.svg)](https://codesandbox.io/s/github/calpa/gatsby-starter-calpa-blog/tree/master/)\n\n如果你喜欢 [我的博客](https://calpa.me)，请给个 star，多谢。以下是如何使用这个博客系统的教程：\n\n## 前提\n\n1. Git\n2. Node：从 8.5.0 或更高版本开始的任何 8.x 版本\n3. fork 本项目 （想要贡献的话）\n4. 在本地计算机上克隆本项目\n\n## 开发\n\n如何运行？\n\n1. 安装 Gatsby-CLI\n\n```\nnpm install --global gatsby-cli\n```\n\n2. 使用 Gatsby 启动器创建新的 Gatsby 项目，`awesome-blog`是您博客的文件夹\n\n```\ngatsby new awesome-blog https://github.com/calpa/gatsby-starter-calpa-blog\n```\n\n3. 打开文件夹\n\n```\ncd awesome-blog\n```\n\n4. 运行开发服务器\n\n   1. `npm start` 启动热重载开发服务器 (基于[Gatsby](https://www.gatsbyjs.org/))\n   2. `open http://localhost:8000` 在您喜欢的浏览器中打开\n\n5. 连接 [Contentful][1] 服务器\n\n   1. 将以下配置添加到`.env.development`文件中\n\n   ```\n   API_SPACE_ID = Your Contentful Space ID\n   API_TOKEN = Your Content Delivery (Preview) API - access token\n   ```\n\n   如果您使用的是[Contentful 的预览 API](https://www.contentful.com/developers/docs/references/content-preview-api/)，那么所有未发布的内容都将可用。\n\n## 配置\n\n在 `data/config`编辑 exports 的对象\n\n注意一下: [想要查找 theme_color 十六进制代码，请单击此处。](https://www.colorhexa.com/)\n\n```\nmodule.exports = {\n  title: 'your blog title here',\n  maxPages: 12\n  meta: {\n    description: 'blog description',\n    keyword: 'blog, JavaScript',\n    theme_color: '#hexcode',\n    favicon: 'https:yourimageurl.com',\n    google_site_verification: 'your google verification hash',\n  },\n  name: 'your name',\n  email: 'your_email@gmail.com',\n  iconUrl: 'https://youricon.jpg',\n  License: 'by',\n  url: 'https://yourblog.me',\n  about: '/2018/05/01/about-your-name/',\n  // Sidebar\n  zhihuUsername: 'your zhiu user name here',\n  githubUsername: 'your github user name here',\n  friends: [\n    {\n      title: 'friend title',\n      href: 'link to their blog',\n    }\n  ]\n```\n\n插件的配置文件:\n\n```\ngaOptimizeId: 'GTM-WHP7SC5',\ngaTrackId: 'UA-84737574-3',\nnavbarList: [\n  {\n    href: '/stats/',\n    title: 'stat title',\n  },\n  {\n    href: '/tags/',\n    title: 'tags',\n  },\n  {\n    href: '/guestbook/',\n    title: 'guestbook',\n  },\n  {\n    href: '/2018/10/04/about-your-blog/',\n    title: 'your title',\n  },\n],\nredirectors: [\n  {\n    fromPath: '/',\n    toPath: '/page/1',\n  },\n],\n```\n\n[Gitalk](https://gitalk.github.io/) 的配置部分：\n\n```\ngitalk: {\n    clientID: '18255f031b5e11edd98a',\n    clientSecret: '2ff6331da9e53f9a91bcc991d38d550c85026714',\n    repo: 'calpa.github.io',\n    owner: 'calpa',\n    admin: ['calpa'],\n    distractionFreeMode: true,\n  },\n}\n```\n\n## 内容模型\n\n1. 帖子\n\n要创建帖子，只需提供以下对象模型：\n\n```json\n{\n  \"name\": \"Post\",\n  \"fields\": {\n    \"title\": \"Post Title\",\n    \"headerImgur\": \"header Image Link\",\n    \"headerBackgroundColor\": \"#66ccff\",\n    \"tags\": \"tag1, tag2, tag3\",\n    \"url\": \"awesome-post\",\n    \"createdDate\": \"new Date() or other dayjs supported datetime value\",\n    \"content\": \"your markdown content\",\n    \"jueJinLikeIconLink\": \"掘金 Badge Icon Url\",\n    \"jueJinPostLink\": \"掘金 Post Url\"\n  }\n}\n```\n\n2. Headers\n\n有两个可配置的 Headers ，分别为 [主页](https://calpa.me) 和 [标签页](https://calpa.me/tags/)顶部的 #header 。\n\n```json\n{\n  \"name\": \"Headers\",\n  \"fields\": {\n    \"purpose\": \"Tags or Home\",\n    \"headerImage\": \"header Image\",\n    \"createdDate\": \"new Date() or other dayjs supported datetime value\",\n    \"title\": \"Display Title\",\n    \"titleVisible\": \"Do you want to show your title in the header?\",\n    \"subTitle\": \"Display a smaller wordings\",\n    \"subTitleVisible\": \"Do you want to show a smaller wordings in the header?\"\n  }\n}\n```\n\n## 部署\n\n[Calpa 的博客](https://calpa.me) 目前正在使用[Netlify](https://www.netlify.com/)，当然，您可以使用 Github Pages 作为替代方案。\n\n- Github Pages\n\n  `npm run deploy` 将博客部署到 Github Pages\n\n- Netlify\n\n  自动部署\n\n## 故障排除\n\n- 对于 `window is defined`, 引包前检查 window :\n\n  ```JavaScript\n  if (typeof window !== `undefined`) {\n    const module = require(\"module\");\n  }\n  ```\n\n- `npm run reset` 清除本地缓存\n- 查 [GatsbyJS 调试文档](https://www.gatsbyjs.org/docs/debugging-html-builds/)\n\n## 贡献\n\n请阅读 [CONTRIBUTING.md](.github/CONTRIBUTING.md) 获取更多信息。\n\n## 联系\n\n如果您对此项目感兴趣，请随时联系[Calpa Liu](calpaliu@gmail.com)。\n\n感谢您的贡献...... :)\n\n[1]: https://www.contentful.com/ \"Contentful\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavbree%2Fhappy-sycamore","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavbree%2Fhappy-sycamore","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavbree%2Fhappy-sycamore/lists"}