nst/craft-publisher
最新稳定版本:5.0.3
Composer 安装命令:
composer require nst/craft-publisher
包简介
Publisher X enables you to publish saved Drafts on a future date without the need to handle the cache expiration logic. The cronjob handles the publication and the cache invalidation.
README 文档
README
Publisher X enables you to publish saved Drafts on a future date. The cronjob handles the publication, and cache invalidation is managed through Craft CMS's native element save events.
It also handles entries which are to expire or published in the future correctly and will trigger cache invalidation through Craft's standard element lifecycle events.
Permissions
To publish a draft, the user needs the "Save entries" permission on the section of the entry.
Installation
Install using composer require nst/craft-publisher and install in Craft.
Setup
Setup a Cron Job which runs every minute.
Call it via CLI or web:
Web:
* * * * * /usr/bin/curl --silent --compressed {siteUrl}/actions/publisher-x/api/publish
CLI:
* * * * * [PATH_TO_CRAFT_INSTALLATION]/craft publisher-x/publish
Usage with cache plugins
If you have a fullpage cache plugin like blitz installed, which refreshes it's cache over the queue, make sure you also set up cronjobs which run the queue and refresh the expired caches.
* * * * * [PATH_TO_CRAFT_INSTALLATION]/craft blitz/cache/refresh-expired * * * * * [PATH_TO_CRAFT_INSTALLATION]/craft queue/run
统计信息
- 总下载量: 498
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-01-22
