├── .github ├── ISSUE_TEMPLATE │ ├── config.yml │ └── template_friend.yaml ├── configs │ └── label-commenter-config.yml └── workflows │ ├── _migration.yml │ ├── feed-posts-parser.yml │ ├── label-commenter.yml │ └── reachability-checker.yml ├── .gitignore └── README.md /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/template_friend.yaml: -------------------------------------------------------------------------------- 1 | name: 友链模板 2 | description: 自助添加友链。 3 | labels: ['审核中'] 4 | body: 5 | - type: checkboxes 6 | id: checks 7 | attributes: 8 | label: 检查清单 9 | description: 请认真检查以下清单中的每一项,并在相符的项前打勾。(在满足所有条件后才会通过,不满足的项请不要勾选) 10 | options: 11 | - required: true 12 | label: 合法的、非营利性、无商业广告、无木马植入。 13 | - required: false 14 | label: 有实质性原创内容的 HTTPS 站点,发布过至少 10 篇原创文章,内容题材不限。 15 | - required: false 16 | label: 有独立域名,非免费域名。 17 | - required: false 18 | label: 博客已运行至少半年,非刚搭建好。 19 | - required: false 20 | label: 先友后链:与博主有至少**半年**的双向有效互动,例如互相留言评论、issue、PR等。 21 | - type: textarea 22 | id: json-data 23 | validations: 24 | required: true 25 | attributes: 26 | label: 友链信息 27 | description: 请在双引号中填写,不要修改格式。 28 | value: | 29 | 38 | 39 | ```json 40 | { 41 | "title": "", 42 | "url": "", 43 | "icon": "", 44 | "screenshot": "", 45 | "description": "", 46 | "feed": "" 47 | } 48 | ``` 49 | 50 | 51 | - type: input 52 | id: friends-html 53 | attributes: 54 | label: 友链地址 55 | description: 请输入您的友链页面地址,用于 Actions 自动检测。 56 | placeholder: "如: https://xaoxuu.com/friends/" 57 | validations: 58 | required: true 59 | - type: input 60 | id: friends-repo 61 | attributes: 62 | label: 友链仓库(可选) 63 | description: 如果您使用 issue 作为友链源,请附上 issue 仓库链接,博主将会前往您的仓库自行填写友链。 64 | placeholder: "如: https://github.com/xaoxuu/friends/" 65 | -------------------------------------------------------------------------------- /.github/configs/label-commenter-config.yml: -------------------------------------------------------------------------------- 1 | # .github/configs/label-commenter-config.yml 2 | 3 | labels: 4 | - name: '审核中' 5 | labeled: 6 | issue: 7 | body: | 8 | **感谢您的支持,接下来请完成任务或等待审核!** 9 | 10 | 您已经完成了友链申请,由于博主设置了友链申请条件,接下来博主将会等待条件满足后完成审批。 11 | 12 | > 如果您还未满足互换友链的条件,可以先去 [博客](https://xaoxuu.com) 里互动互动~ 13 | 14 | unlabeled: 15 | issue: 16 | body: | 17 | **🎉 恭喜,友链添加成功!** 18 | 19 | 稍后片刻刷新 [网页](https://xaoxuu.com/friends/) 就可以看到您的链接。 20 | 21 | > 如果您的站点信息发生了变动,请直接修改这个 issue 的内容。 22 | 23 | - name: '缺少互动' 24 | labeled: 25 | issue: 26 | body: | 27 | **🥹 很遗憾,部分条件未满足~** 28 | 29 | 很感谢您的支持,但目前尚未满足交换友链的必要条件:与 xaoxuu 有至少**半年**的双向有效互动。 30 | 31 | - name: '缺少文章' 32 | labeled: 33 | issue: 34 | body: | 35 | **🥹 很遗憾,部分条件未满足~** 36 | 37 | 很感谢您的支持,但尚未满足交换友链的必要条件:发布过至少 5 篇原创文章。 38 | 39 | - name: '未添加友链' 40 | labeled: 41 | issue: 42 | body: | 43 | **👋 请及时添加本站友链** 44 | 45 | 距离成功只剩一步之遥了,请把本站添加到您的友链中,然后再下方评论告知。 46 | 47 | - name: '长期失联' 48 | labeled: 49 | issue: 50 | action: close 51 | body: | 52 | **⚠️ 抱歉,您的网站长期打不开,现已暂时下架。** 53 | 54 | 如果您确认可以打开,请在下方评论告知,我们会在人工审核通过后恢复上架。 55 | -------------------------------------------------------------------------------- /.github/workflows/_migration.yml: -------------------------------------------------------------------------------- 1 | name: Data Migration 2 | 3 | on: 4 | workflow_dispatch: # 仅需数据格式升级的时候手动执行一次即可 5 | 6 | jobs: 7 | friends-data-migration: 8 | runs-on: ubuntu-latest 9 | permissions: 10 | issues: write 11 | steps: 12 | - name: friends-data-migration 13 | uses: xaoxuu/friends-data-migration@main 14 | env: 15 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this as is, it's automatically generated 16 | -------------------------------------------------------------------------------- /.github/workflows/feed-posts-parser.yml: -------------------------------------------------------------------------------- 1 | name: Feed Posts Parser 2 | 3 | on: 4 | workflow_dispatch: # Allows manual triggering 5 | schedule: 6 | - cron: '0 21 * * *' # Runs daily at 21:00 7 | 8 | jobs: 9 | feed-parser: 10 | runs-on: ubuntu-latest 11 | permissions: 12 | issues: write 13 | contents: write 14 | steps: 15 | - name: Checkout repository 16 | uses: actions/checkout@v4 17 | - name: Run Feed Post Parser 18 | uses: xaoxuu/feed-posts-parser@main 19 | env: 20 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 21 | with: 22 | data_path: '/v2/data.json' 23 | posts_count: 3 24 | date_format: 'YYYY-MM-DD HH:mm' 25 | # 重新生成一下JSON 26 | - name: Generate data.json 27 | uses: xaoxuu/issues2json@main 28 | env: 29 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 30 | with: 31 | data_version: 'v2' 32 | data_path: '/v2/data.json' 33 | sort: 'posts-desc' # 'created-desc'/'created-asc'/'updated-desc'/'updated-asc' 34 | exclude_issue_with_labels: '审核中, 缺少互动, 缺少文章, 风险网站' # 具有哪些标签的issue不生成到JSON中 35 | hide_labels: '白名单' # 这些标签不显示在前端页面 36 | - name: Setup Git Config 37 | run: | 38 | git config --global user.name 'github-actions[bot]' 39 | git config --global user.email 'github-actions[bot]@users.noreply.github.com' 40 | - name: Commit and Push to output branch 41 | run: | 42 | git fetch origin output || true 43 | git checkout -B output 44 | git add --all 45 | git commit -m "Update data from issues" || echo "No changes to commit" 46 | git push -f origin output 47 | -------------------------------------------------------------------------------- /.github/workflows/label-commenter.yml: -------------------------------------------------------------------------------- 1 | name: Label Commenter 2 | 3 | on: 4 | issues: 5 | types: 6 | - labeled 7 | - unlabeled 8 | 9 | jobs: 10 | comment: 11 | runs-on: ubuntu-latest 12 | steps: 13 | - uses: actions/checkout@v3 14 | 15 | - name: Label Commenter 16 | uses: peaceiris/actions-label-commenter@v1 17 | with: 18 | github_token: ${{ secrets.GITHUB_TOKEN }} 19 | config_file: .github/configs/label-commenter-config.yml -------------------------------------------------------------------------------- /.github/workflows/reachability-checker.yml: -------------------------------------------------------------------------------- 1 | name: Reachability Checker 2 | 3 | # Controls when the workflow will run 4 | on: 5 | issues: 6 | # 新增(打开)/关闭/重新打开/设置标签/移除标签 7 | types: [opened, closed, reopened, labeled, unlabeled] 8 | # 手动触发 9 | workflow_dispatch: 10 | 11 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 12 | jobs: 13 | # This workflow contains a single job called "build" 14 | reachability-checker: 15 | # The type of runner that the job will run on 16 | runs-on: ubuntu-latest 17 | permissions: 18 | contents: write 19 | issues: write 20 | # Steps represent a sequence of tasks that will be executed as part of the job 21 | steps: 22 | - name: Checkout repository 23 | uses: actions/checkout@v4 24 | # 检查链接状态 25 | - name: Check Reachability 26 | uses: xaoxuu/links-checker@main 27 | env: 28 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 29 | with: 30 | checker: 'reachability' 31 | unreachable_label: '失联' 32 | exclude_issue_with_labels: '审核中, 白名单, 缺少互动, 缺少文章' # 具有哪些标签的issue不进行检查 33 | # 检查完毕后重新生成一下JSON 34 | - name: Generate data.json 35 | uses: xaoxuu/issues2json@main 36 | env: 37 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 38 | with: 39 | data_version: 'v2' 40 | data_path: '/v2/data.json' 41 | sort: 'posts-desc' # created-desc/created-asc/updated-desc/updated-asc/version-desc/posts-desc 42 | exclude_issue_with_labels: '审核中, 缺少互动, 缺少文章, 风险网站' # 具有哪些标签的issue不生成到JSON中 43 | hide_labels: '白名单' # 这些标签不显示在前端页面 44 | - name: Setup Git Config 45 | run: | 46 | git config --global user.name 'github-actions[bot]' 47 | git config --global user.email 'github-actions[bot]@users.noreply.github.com' 48 | - name: Commit and Push to output branch 49 | run: | 50 | git fetch origin output || true 51 | git checkout -B output 52 | git add --all 53 | git commit -m "Update data from issues" || echo "No changes to commit" 54 | git push -f origin output 55 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 友链数据源 2 | 3 | 前端页面: https://xaoxuu.com/friends/ 4 | 5 | ## 什么类型的网站可以添加 6 | 7 | 必须同时满足: 8 | 9 | 1. 合法的、非营利性、无商业广告站点。 10 | 2. 有实质性原创内容的个人博客或组织。 11 | 3. 必须是 HTTPS 独立域名。 12 | 13 | ## 如何添加 14 | 15 | 按照 [Issue 模板](https://github.com/xaoxuu/friends/issues/new/choose) 内容填写并提交,审核通过3分钟后博客即可看到友链。 16 | --------------------------------------------------------------------------------