{"id":18029092,"url":"https://github.com/talaxy009/gatsby-plugin-waline","last_synced_at":"2026-01-23T02:19:55.971Z","repository":{"id":93832462,"uuid":"608034895","full_name":"Talaxy009/gatsby-plugin-waline","owner":"Talaxy009","description":"A Gatsby plugin for Waline comment system","archived":false,"fork":false,"pushed_at":"2024-05-09T14:00:00.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-14T10:58:34.507Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Talaxy009.png","metadata":{"files":{"readme":"README-zh.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-01T07:19:04.000Z","updated_at":"2024-05-09T14:00:03.000Z","dependencies_parsed_at":"2023-06-15T07:00:10.649Z","dependency_job_id":null,"html_url":"https://github.com/Talaxy009/gatsby-plugin-waline","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/Talaxy009%2Fgatsby-plugin-waline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Talaxy009%2Fgatsby-plugin-waline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Talaxy009%2Fgatsby-plugin-waline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Talaxy009%2Fgatsby-plugin-waline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Talaxy009","download_url":"https://codeload.github.com/Talaxy009/gatsby-plugin-waline/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248868804,"owners_count":21174757,"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-10-30T09:08:00.966Z","updated_at":"2026-01-23T02:19:55.938Z","avatar_url":"https://github.com/Talaxy009.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gatsby-plugin-waline\n\n[![npm version](https://badge.fury.io/js/gatsby-plugin-waline.svg)](https://badge.fury.io/js/gatsby-plugin-waline)\n\n一个为 Gatsby 站点嵌入 [Waline](https://waline.js.org/) 评论系统的插件。\n\n## ✨ 功能\n\n本插件能帮你在你的站点更轻松地使用 Waline 评论。\n\n- 使用 React Hooks API 对最新的 Waline 进行纯粹的封装\n- 支持 Waline 的所有配置\n- 由 TypeScript 编写\n\n## 🚚 安装\n\n```shell\nnpm install gatsby-plugin-waline\nnpm install -D @waline/client\n```\n\n或\n\n```shell\nyarn add gatsby-plugin-waline\nyarn add -D @waline/client\n```\n\n本插件依赖 **React v16.8** 或更高版本。\n\n## 🔦 使用方法\n\n0. 查看 Waline [官方文档](https://waline.js.org/guide/get-started/) 以部署你的服务端。\n\n1. 修改你的 gatsby-config.js 文件以启用本插件\n\n    ```js\n    // 你的 gatsby-config.js\n    plugins: [\n        {\n            resolve: `gatsby-plugin-waline`,\n            options: {\n                // 插件配置\n                serverURL: 'YOUR_SERVER_URL',\n            },\n        },\n    ];\n    ```\n\n2. 在你的页面代码中使用 `\u003cWaline /\u003e` 组件\n\n    ```jsx\n    import React from 'react';\n    import Waline from 'gatsby-plugin-waline';\n\n    export default function Page({location}) {\n        return (\n            \u003cLayout\u003e\n                \u003cWaline path={location.pathname} /*组件配置*/ /\u003e\n            \u003c/Layout\u003e\n        );\n    }\n    ```\n\n    插件配置项和组件配置项是一样的。你可以把常用配置 (如 `serverURL`, `emoji`) 放在插件配置中，把为页面单独配置的选项 (如 `path`) 放在组件配置中。配置会被合并且来自组件的配置有更高的优先级。\n\n3. 在你的 gatsby-browser.js 导入 CSS 文件\n\n    ```jsx\n    // 你的 gatsby-browser.js\n    import '@waline/client/dist/waline.css';\n    ```\n\n    关于自定义样式的信息，详见：\u003chttps://waline.js.org/guide/features/style.html\u003e\n\n在这之后，你应该能够在你的站点添加和查看评论了。\n\n## 🔧 配置项\n\n详见：\u003chttps://waline.js.org/reference/client/props.html\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftalaxy009%2Fgatsby-plugin-waline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftalaxy009%2Fgatsby-plugin-waline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftalaxy009%2Fgatsby-plugin-waline/lists"}