{"id":21645179,"url":"https://github.com/pluginpal/strapi-plugin-publisher","last_synced_at":"2025-04-04T09:06:38.389Z","repository":{"id":39879822,"uuid":"459463440","full_name":"pluginpal/strapi-plugin-publisher","owner":"pluginpal","description":"A plugin for Strapi Headless CMS that provides the ability provides the ability to easily schedule publishing and unpublishing of any content type.","archived":false,"fork":false,"pushed_at":"2025-03-26T16:08:17.000Z","size":1699,"stargazers_count":56,"open_issues_count":15,"forks_count":21,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-28T08:06:41.831Z","etag":null,"topics":["publisher","publishing","strapi","strapi-plugin","strapi-publisher"],"latest_commit_sha":null,"homepage":"https://www.pluginpal.io/plugin/publisher","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pluginpal.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-02-15T06:57:35.000Z","updated_at":"2025-03-26T16:05:15.000Z","dependencies_parsed_at":"2024-12-18T19:36:57.412Z","dependency_job_id":"050f178f-2019-46e8-8dce-37513a33f48f","html_url":"https://github.com/pluginpal/strapi-plugin-publisher","commit_stats":{"total_commits":35,"total_committers":6,"mean_commits":5.833333333333333,"dds":"0.19999999999999996","last_synced_commit":"82daae582c33ac9b34b986c94ec7dddac8a5c1e9"},"previous_names":["comfortablycoding/strapi-plugin-publisher","pluginpal/strapi-plugin-publisher","strapi-community/strapi-plugin-publisher"],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pluginpal%2Fstrapi-plugin-publisher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pluginpal%2Fstrapi-plugin-publisher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pluginpal%2Fstrapi-plugin-publisher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pluginpal%2Fstrapi-plugin-publisher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pluginpal","download_url":"https://codeload.github.com/pluginpal/strapi-plugin-publisher/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247149500,"owners_count":20891954,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["publisher","publishing","strapi","strapi-plugin","strapi-publisher"],"created_at":"2024-11-25T05:47:37.727Z","updated_at":"2025-04-04T09:06:38.361Z","avatar_url":"https://github.com/pluginpal.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# strapi-plugin-publisher\n\nA plugin for [Strapi](https://github.com/strapi/strapi) that provides the ability to easily schedule publishing and unpublishing of any content type.\n\n[![Downloads](https://img.shields.io/npm/dm/strapi-plugin-publisher?style=for-the-badge)](https://img.shields.io/npm/dm/strapi-plugin-publisher?style=for-the-badge)\n[![Install size](https://img.shields.io/npm/l/strapi-plugin-publisher?style=for-the-badge)](https://img.shields.io/npm/l/strapi-plugin-publisher?style=for-the-badge)\n[![Package version](https://img.shields.io/github/v/release/PluginPal/strapi-plugin-publisher?style=for-the-badge)](https://img.shields.io/github/v/release/PluginPal/strapi-plugin-publisher?style=for-the-badge)\n\n## Requirements\n\nThe installation requirements are the same as Strapi itself and can be found in the documentation on the [Quick Start](https://strapi.io/documentation/developer-docs/latest/getting-started/quick-start.html) page in the Prerequisites info card.\n\n### Supported Strapi versions\n\n- Strapi ^4.x.x (use `strapi-plugin-publisher@^1`)\n- Strapi ^5.2.x (use `strapi-plugin-publisher@^2`)\n\n**NOTE**: While this plugin may work with the older Strapi versions, they are not supported, it is always recommended to use the latest version of Strapi.\n\n## Installation\n\n```sh\nnpm install strapi-plugin-publisher\n```\n\n**or**\n\n```sh\nyarn add strapi-plugin-publisher\n```\n\n## Configuration\n\n### Enable the plugin\n\nThe plugin configuration is stored in a config file located at ./config/plugins.js. If this file doesn't exists, you will need to create it.\n\n\nA sample configuration\n\n```javascript\nmodule.exports = ({ env }) =\u003e ({\n  // ..\n\t'publisher': {\n\t\tenabled: true,\n\t\tconfig: {\n\t\t\thooks: {\n\t\t\t\tbeforePublish: async ({ strapi, uid, entity }) =\u003e {\n\t\t\t\t\tconsole.log('beforePublish');\n\t\t\t\t},\n\t\t\t\tafterPublish: async ({ strapi, uid, entity }) =\u003e {\n\t\t\t\t\tconsole.log('afterPublish');\n\t\t\t\t},\n\t\t\t\tbeforeUnpublish: async ({ strapi, uid, entity }) =\u003e {\n\t\t\t\t\tconsole.log('beforeUnpublish');\n\t\t\t\t},\n\t\t\t\tafterUnpublish: async ({ strapi, uid, entity }) =\u003e {\n\t\t\t\t\tconsole.log('afterUnpublish');\n\t\t\t\t},\n\t\t\t},\n\t\t},\n\t},\n\t// ..\n});\n```\n\n### The Complete Plugin Configuration  Object\n\n| Property                         | Description                                                                      | Type     | Default | Required |\n|----------------------------------|----------------------------------------------------------------------------------|----------| ------- | -------- |\n| actions                          | Settings associated with any actions.                                            | Object   | {} | No |\n| actions.syncFrequency            | The frequency to check for actions to run. It is a cron expression               | String   | '*/1 * * * *' | No |\n| components                       | Settings associated with any of the plugins components                           | Object   | {} | No |\n| components.dateTimePicker        | Settings associated with the DateTimePicker component used to set action times   | Object   | {} | No |\n| components.dateTimePicker.step   | The step between the numbers displayed for the time section of the DateTimePicker | Number   | 1 | No |\n| components.dateTimePicker.locale | Allows to enforce another locale to change the date layout                       | String   | browser locale | No |\n| hooks.beforePublish              | An async function that runs before a content type is published                   | Function | () =\u003e {} | No |\n| hooks.afterPublish               | An async function that runs after a content type is published                    | Function | () =\u003e {} | No |\n| hooks.beforeUnpublish            | An async function that runs before a content type is un-published                | Function | () =\u003e {} | No |\n| hooks.afterUnpublish             | An async function that runs after a content type is un-published                 | Function | () =\u003e {} | No |\n| contentTypes                     | A list of content type uids where the publish actions should be displayed        | Array\u003cString\u003e | All content types | No |\n\n### Enable server cron\n\nThe `cron.enabled` configuration option needs to be set to true in [Server Configuration](https://docs.strapi.io/developer-docs/latest/setup-deployment-guides/configurations/required/server.html#server-configuration) for the plugin to work.\n\n## Usage\n\nOnce the plugin has been installed, configured and enabled a `Publisher` section will be added to the `informations` section of the edit view for all content types (single + collection) that have `draftAndPublish` enabled. The `Publisher` section will provide the ability to schedule publishing and unpublishing of the content type. The content type publication status is checked every minute.\n\n\u003e If the Publisher section does not appear in the admin after the plugin is enabled then a clean rebuild of the admin is required. This can be done by deleting the generated `.cache` and `build` folders and then re-running the `develop` command. \n\n### Single Content Type\n\n![Sample single content type publisher section](https://github.com/PluginPal/strapi-plugin-publisher/blob/master/assets/single.png?raw=true)\n\n### Collection Content Type\n\n![Sample collection content type publisher section](https://github.com/PluginPal/strapi-plugin-publisher/blob/master/assets/collection.png?raw=true)\n\n### Adding a (un)publish date\n\nNavigate to the entity record that should be (un)published, under the `informations` section click the `Add a (un)publish date` button. Enter in the date and click save, the entity record will then be (un)published at the specified time.\n\n![default](https://github.com/PluginPal/strapi-plugin-publisher/blob/master/assets/default.png?raw=true)\n\n![Add a (un)publish date](https://github.com/PluginPal/strapi-plugin-publisher/blob/master/assets/add.png?raw=true)\n\n### Editing a (un)publish date\n\nNavigate to the entity record that requires its date changed, under the `informations` section click the `Edit (un)publish date` button. Enter in the new date and click save.\n\n![Edit a (un)publish date](https://github.com/PluginPal/strapi-plugin-publisher/blob/master/assets/edit-delete.png?raw=true)\n\n### Deleting a (un)publish date\n\nNavigate to the entity record that contains the date that should be removed, under the `informations` section click the `Delete (un)publish date` button.\n\n![Delete a (un)publish date](https://github.com/PluginPal/strapi-plugin-publisher/blob/master/assets/edit-delete.png?raw=true)\n\n## Bugs\n\nIf any bugs are found please report them as a [Github Issue](https://github.com/PluginPal/strapi-plugin-publisher/issues)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpluginpal%2Fstrapi-plugin-publisher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpluginpal%2Fstrapi-plugin-publisher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpluginpal%2Fstrapi-plugin-publisher/lists"}