Skip to content

get all tag need add filter: "visibility:public" #85

@rebron1900

Description

@rebron1900

在使用了 Internal tags 的情况下会出现 /404/ 键值重复的情况。
所以获取所有Tags时需要过滤掉Internal tags。
When using Internal tags, there may be duplicate values for /404/ key. Therefore, it is necessary to filter out Internal tags when retrieving all Tags.

  // Get all tags
  config.addCollection("tags", async function(collection) {
    collection = await api.tags
      .browse({
        include: "count.posts",
        limit: "all",
       filter: "visibility:public" // 
      })
      .catch(err => {
        console.error(err);
      });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions