Astro Theme Pure

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: