Avatar 灵的梦境

Back

Friend Links

Configurations for friend links

Links page is a page for showing your friend blog links, which is enabled by default.

If you want to remove the links page for any reason, follow the steps in this section. Otherwise, you can skip ahead to the next chapter.

Set links.enable to false in src/site.config.ts:

src/site.config.ts
export const integ: IntegrationUserConfig = {
  // ...
  links: {
    enable: false
  }
}
ts

And also, remember to delete the following folders & files:

  • src/components/links/
  • src/pages/links/
  • public/links.json

Basic Configurations#

A basic configuration for friend links is in src/site.config.ts. You can add your friend’s logbook or your own link info.

The friend links configurations are at public/links.json.

Integrated with Friend-Circle-Lite#

Friend-Circle-Lite is a stripped-down friend-link app with no backend and running only using github action.

It requires:

  1. A github repository with github actions enabled by cron.
  2. A static site server like Vercel, Netlify, GitHub Pages, etc.

This theme has not integrated it and will not provide support for it in the future. But don’t worry, this doc will guide you to integrate it.

  1. Fork the Friend-Circle-Lite.

  2. Modify the config.yaml in your forked repository:

    config.yaml
    spider_settings:
       enable: true
       json_url: "<your-site>/links.json"
       article_count: 4
    yaml
  3. Go to “Actions” page and run workflow “Friend Circle Lite” manually to check if it works. This will also generate server files in “page” branch.

  4. Checkout docs to deploy the server files to your static site server.

  5. Add fetching script file friendCircle.ts to your project at path src/plugins.

  6. Add style file fc.css to your project at path src/assets/styles.

  7. Add initialize code in src/components/pages/links/index.astro:

帮助与支持

这篇文档有帮助吗?

请给我们反馈以改进文档质量
(点击按钮后会打开邮箱)

帮助改进文档

所有文档均开源,发现问题或不清楚的地方?提交 PR 来帮助改进。

编辑此页面 了解如何贡献 →

需要更多帮助?

加入社区或直接联系获取支持

探索更多

发现知识库中的更多指南与资源