{"id":22218786,"url":"https://github.com/jacklightchen/disqus-proxy-serverless","last_synced_at":"2025-07-27T14:33:01.610Z","repository":{"id":36923793,"uuid":"231016142","full_name":"jacklightChen/disqus-proxy-serverless","owner":"jacklightChen","description":"实现 Disqus 代理的 Serverless 服务 解决国内不能访问 Disqus 的问题 可用于hexo等博客","archived":false,"fork":false,"pushed_at":"2022-12-10T13:30:55.000Z","size":539,"stargazers_count":39,"open_issues_count":12,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T03:11:57.189Z","etag":null,"topics":["disqus-proxy","hexo","serverless"],"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/jacklightChen.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}},"created_at":"2019-12-31T03:05:02.000Z","updated_at":"2024-04-19T01:56:50.000Z","dependencies_parsed_at":"2023-01-17T07:14:59.030Z","dependency_job_id":null,"html_url":"https://github.com/jacklightChen/disqus-proxy-serverless","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jacklightChen/disqus-proxy-serverless","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacklightChen%2Fdisqus-proxy-serverless","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacklightChen%2Fdisqus-proxy-serverless/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacklightChen%2Fdisqus-proxy-serverless/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacklightChen%2Fdisqus-proxy-serverless/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jacklightChen","download_url":"https://codeload.github.com/jacklightChen/disqus-proxy-serverless/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jacklightChen%2Fdisqus-proxy-serverless/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267370684,"owners_count":24076474,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"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":["disqus-proxy","hexo","serverless"],"created_at":"2024-12-02T22:29:10.577Z","updated_at":"2025-07-27T14:33:01.311Z","avatar_url":"https://github.com/jacklightChen.png","language":"JavaScript","readme":"# disqus-proxy-serverless\n如有疑问请阅读这篇[博客](https://blog.lightina.cn/2019/12/30/hexo+netlify\u0026serverless+disqus/), inspired by [szhielelp](https://github.com/szhielelp)\n\n## 使用步骤\n1. clone代码 并配置src目录下的config.js\n    ```\n    git clone https://github.com/jacklightChen/disqus-proxy-serverless.git\n    cd disqus-proxy-serverless\n    ```\n\n    ``` js\n    module.exports = {\n      // 因为要部署在Serverless服务上，端口无所谓，随便填\n      port: 5050, \n      // Your Disqus Public Key\n      api_key: '',\n      // Your Disqus Secret Key\n      api_secret: '',\n      // Your Disqus Name\n      username: 'jacklightchen',\n    };\n    ```\n    各种 Key 需要在 [Disqus 的 API 页面](https://disqus.com/api/applications/) 申请\n\n    **重要** 另外需要到 `Settings =\u003e Community` 里开启访客评论\n\n2. 部署至Serverless平台Now\n\n    tips:没有安装now 需首先安装now\n    ```\n    npm i -g now\n    ```\n    然后输入以下commands\n    ```\n    cd disqus-proxy-serverless\n    now login 输入邮箱并验证\n    now --name Disqus-Proxy\n    ```\n    此时可在自己的 ZEIT 的 Dashboard 那边: https://zeit.co/dashboard\n\n    看到该服务分配的域名: disqus-proxy.1797079433.now.sh 这个域名需填在hexo的配置文件中\n    \n    到这一步服务端就部署好了，可通过: disqus-proxy.1797079433.now.sh/api/listPosts 测试，正确的话会返回json格式的评论\n3. 修改hexo的配置文件\n    \n    使用 [disqus-proxy](https://github.com/ciqulover/disqus-proxy)\n    \n    3.1 在`Hexo`博客目录执行\n    ```\n    npm install hexo-disqus-proxy --save\n    ```\n    \n    3.2 在你的`Hexo`博客目录中修改`_config.yml`文件 添加如下配置：（注意缩进和空格）\n    \n    配置文件需要注意port 如果用https就是443 http就是80\n    ```\n    disqus_proxy:\n      shortname: jacklightchen\n      username: jacklightchen\n      host: disqus-proxy.1797079433.now.sh\n      port: 443\n    ```\n    \n4. 大功告成 重新部署你的hexo查看效果吧！","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacklightchen%2Fdisqus-proxy-serverless","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjacklightchen%2Fdisqus-proxy-serverless","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjacklightchen%2Fdisqus-proxy-serverless/lists"}