{"id":18408367,"url":"https://github.com/pingcap/website","last_synced_at":"2025-04-07T09:32:54.255Z","repository":{"id":37179935,"uuid":"232287477","full_name":"pingcap/website","owner":"pingcap","description":"The website of PingCAP. Powered by Gatsby ⚛️ and Rocket 🚀.","archived":false,"fork":false,"pushed_at":"2023-05-31T20:11:16.000Z","size":19842,"stargazers_count":11,"open_issues_count":22,"forks_count":20,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-03-22T16:02:24.718Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pingcap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"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-01-07T09:15:44.000Z","updated_at":"2023-11-15T00:28:00.000Z","dependencies_parsed_at":"2024-11-06T03:30:51.641Z","dependency_job_id":null,"html_url":"https://github.com/pingcap/website","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingcap%2Fwebsite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingcap%2Fwebsite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingcap%2Fwebsite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pingcap%2Fwebsite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pingcap","download_url":"https://codeload.github.com/pingcap/website/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247626461,"owners_count":20969307,"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-06T03:18:50.939Z","updated_at":"2025-04-07T09:32:52.659Z","avatar_url":"https://github.com/pingcap.png","language":"JavaScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"images/pingcap-icon.png\" width=\"128\" alt=\"PingCAP Logo\" /\u003e\n\u003c/p\u003e\n\u003ch1 align=\"center\"\u003eWebsite\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003eThe website of PingCAP. Powered by Gatsby ⚛️ and Rocket 🚀.\u003c/p\u003e\n\n[![Netlify Status](https://api.netlify.com/api/v1/badges/d2f80606-1fd8-4f26-938d-65f8cad079b2/deploy-status)](https://app.netlify.com/sites/pingcap-en-preview/deploys)\n\n## How to start\n\nIf you want to start to develop the PingCAP Website or you just want to contribute in one place.\nThe Gatsby.js [https://gatsbyjs.org](https://gatsbyjs.org) is something you have to know.\nBecause of PingCAP Website's development is highly dependent on Gatsby.js.\n\nAlso, in order to build a flexible site, a server is essential.\n\nWe use [Rocket](https://rocket.rs/) to build our restful APIs. So, [Rust](https://www.rust-lang.org/) is also\nthe main tech in our development.\n\nMake sure [node](https://nodejs.org/en/) and [rustup](https://rustup.rs/) is installed. This is all we needed first.\n\nCheck it:\n\n```sh\nnode -v\n# v13.7.0\n\nrustup -V\n# rustup 1.21.1 (7832b2ebe 2019-12-20)\n```\n\nAlso, we recommand you use [yarn](https://classic.yarnpkg.com/en/) as package manager, check it:\n\n```sh\nyarn -v\n# 1.21.1\n```\n\nAll done.~\n\n## How to development\n\nInto project, run:\n\n```sh\nyarn \u0026\u0026 yarn start\n```\n\nif your want to development the server side:\n\n```sh\n# Make sure nightly used\nrustup default nightly\n\ncd server \u0026\u0026 cargo build\n\n# Boot the rocket server\ncargo run\n\n# Check your code\ncargo check\n```\n\n### GitHub Outh2 token\n\nBecause of most of our text data stored in GitHub. So, It's needed to apply a GitHub API token in development.\n\nFor more details, view \u003chttps://developer.github.com/v3/#rate-limiting\u003e\n\nYou must set the token as an env when you start some commands, defined as:\n\n```sh\nGITHUB_AUTHORIZATION_TOKEN=token\n```\n\nIf you are developing the rocket server, it use [dotenv](https://github.com/dotenv-rs/dotenv) to load a `.env` file.\nFirst, create a `.env` file in the `server` folder and pass the `GITHUB_AUTHORIZATION_TOKEN=token` into it.\nThen you can read it by using `dotenv!(\"GITHUB_AUTHORIZATION_TOKEN\")`.\n\n**For detailed configuration of rocket server, view: [server README](./server/README.md)**\n\nFor frontend developing, some scripts will also need this env variable, for example:\n\n```sh\nGITHUB_AUTHORIZATION_TOKEN=token yarn download:blogs:prod\n```\n\n## Style guides\n\n**_If you want make a PR, you should read this part carefully._**\n\nWe use [husky](https://www.npmjs.com/package/husky) and [lint-staged](https://www.npmjs.com/package/lint-staged) to make sure all commits follow the [prettier](https://prettier.io/) setting.\n\n**Don't break the rule!**\n\nThe next need to be noticed is, we use [Bulma](https://bulma.io/) as common components.\n\nSo, for example, our common scss codes `_common.scss` follow the bulma modifiers style, like:\n\n```scss\n// Use in navbar and footer item\n@mixin has-item-active($bottom: false) {\n  position: relative;\n  color: $B4;\n\n  \u0026:hover {\n    background: none;\n    color: $primary;\n\n    @if type-of($bottom) == number {\n      \u0026:after {\n        content: '';\n        position: absolute;\n        bottom: $bottom;\n        left: 50%;\n        width: 20px;\n        height: 3px;\n        background: $primary;\n        transform: translateX(-50%);\n      }\n    }\n  }\n}\n```\n\nYou can view more details in [https://bulma.io/documentation/modifiers/](https://bulma.io/documentation/modifiers/)\n\n**Also, don't break the rule!**\n\n## Authors\n\nPingCAP FE\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpingcap%2Fwebsite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpingcap%2Fwebsite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpingcap%2Fwebsite/lists"}