{"id":15703608,"url":"https://github.com/befovy/mirror","last_synced_at":"2026-04-25T21:31:54.030Z","repository":{"id":57608238,"uuid":"130034477","full_name":"befovy/mirror","owner":"befovy","description":"Collect posts from different places together","archived":false,"fork":false,"pushed_at":"2019-07-05T02:42:05.000Z","size":33,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-04T21:53:48.482Z","etag":null,"topics":["blog","golang","hugo","mirror"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/befovy.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":"2018-04-18T09:01:36.000Z","updated_at":"2024-03-30T12:03:01.000Z","dependencies_parsed_at":"2022-09-03T10:23:01.144Z","dependency_job_id":null,"html_url":"https://github.com/befovy/mirror","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/befovy/mirror","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/befovy%2Fmirror","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/befovy%2Fmirror/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/befovy%2Fmirror/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/befovy%2Fmirror/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/befovy","download_url":"https://codeload.github.com/befovy/mirror/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/befovy%2Fmirror/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32278249,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T18:29:39.964Z","status":"ssl_error","status_checked_at":"2026-04-25T18:29:32.149Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["blog","golang","hugo","mirror"],"created_at":"2024-10-03T20:03:38.105Z","updated_at":"2026-04-25T21:31:54.015Z","avatar_url":"https://github.com/befovy.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mirror\n\n同步github issues、yuque（in progressing）上的内容，输出为 hugo 博客站点的构建内容\n\n\n\u003c!--同步 github issues 内容，并输出为 hugo 可构建的博客内容--\u003e\n\n\n## mirror 配置文件\n\n\n\nmirror 的配置文件使用 yaml 格式， 参考 [conf.yaml](./conf.yaml)  \nmirror 查找运行目录下的mirror.yaml 作为输入配置文件\n\n配置文件中可定义多个内容来源。 每一种不同的内容来源，都有其具体的配置项。\n\n内容来源 \"issues\" 具体的配置内容有\n\n- token: github token, 需要有 issue 读取权限\n- login: github username\n- repo:  要抓取的 issue 所在的 repo 名称\n- prefix: 输出文件名的统一前缀\n- output: 转换成 hugo 博客内容后的本地输出目录，建议指定为 hugo 博客的 content 目录\n\n## 内容来源 Issue 的抓取规则\n\n### draft\n\n打开的Issue 视为博客草稿，不抓取。只抓取已经关闭的 Issue 内容。\n\n\n### content\n\nissue 本身有 body 和 comment。 新建issue时的内容是body， 之后所有项目本人和其它 githuber 的追加的内容都是评论。\n\nMirror 支持将 Issue body 和 comment 都抓取下来余与body部分拼接合并作为完整博客内容。\n\n由于 Issue 都是公开的，可能会被别人评论，作者还可能回复提问者。\n为了区分这种情况，mirror 只拼接 comment 作者是项目作者本人， 且在 comment 开头有一句 html `\u003c!--mirror--\u003e` 注释语句的comment。\n\n\n## Run\n\n```shell\ncp conf.yaml mirror.yaml\n```\n然后修改 mirror.yaml 中的内容\n\n```shell \ngo run app/main.go\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbefovy%2Fmirror","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbefovy%2Fmirror","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbefovy%2Fmirror/lists"}