sitegeist/zombiehunt

寻找不死(隐藏和长期未被触及)的内容,并帮助将其彻底消除

v1.0.3 2024-07-01 15:27 UTC

This package is auto-updated.

Last update: 2024-08-31 15:50:06 UTC


README

寻找并摧毁不死内容

很多时候,编辑人员只会隐藏过时的内容,而从未真正删除它们。随着时间的推移,这会导致一些非常古老的内容被隐藏起来,以至于没有人记得是谁写的,为什么,以及是否可以最终将其删除……我们称这种内容为“僵尸”内容。

此软件包将僵尸内容可视化给编辑人员,并允许自动摧毁已经变成僵尸一段时间的内容。当然,隐藏内容变成僵尸的时间段以及僵尸内容的销毁时间段都是可配置的。

作者与赞助商

此软件包的开发和公开发布得到了我们雇主https://www.sitegeist.de的慷慨赞助。

设置

可以通过设置定义僵尸化及销毁时间段。默认情况下,一年内未被触及的隐藏内容将变成僵尸内容,并在另一年后销毁。

Sitegeist:
    ZombieHunt:
        # hidden nodes turn into zombies after this period
        zombificationPeriod: 31536000
        # zombie-nodes start are due to destruction after this period
        destructionPeriod: 31536000
        # the label for zombie-nodes
        zombieLabel: '🧟'
        # label for zombie-nodes that are due to destruction
        zombieToDestroyLabel: '🔥🧟🔥'

Neos 后端

在文档树和内容结构中,僵尸节点用“🧟”标记,对于即将销毁的僵尸内容用“🔥🧟🔥”标记。此外,僵尸内容在内容树和内容区域的后端渲染中也会被标记。

Cli 命令

以下命令允许寻找和销毁僵尸。

./flow zombie:detect

在给定的站点中检测僵尸。如果检测到即将销毁的僵尸内容,将返回错误代码。

USAGE:
./flow zombie:detect [<options>]

OPTIONS:
--site-node          node-name of the site to scan, if not defined all sites are used
--dimension-values   json of the dimension values to use, otherwise default. Example '{"language":["de"]}'

./flow zombie:destroy

移除即将销毁的僵尸内容

USAGE:
  ./flow zombie:destroy [<options>]

OPTIONS:
  --site-node          node-name of the site to scan, if not defined all sites are used
  --dimension-values   json of the dimension values to use, otherwise default. Example '{"language":["de"]}'
  --dry-run            option to output list of nodes to be deleted without actually deleting them

安装

Sitegeist.ZombieHunt 通过 Packagist 提供。只需运行 composer require sitegeist/zombiehunt 即可安装。我们使用语义版本控制,因此每次重大更改都会增加主版本号。

贡献

我们非常愿意接受贡献。请将您的拉取请求发送给我们。