Open pub is een onderdeel van OpenWeb concept en behelst het beheren en publiceren van nieuwsberichten en taxanomien
- Custom postype (publication)
- Custom taxonnomy ()
Deze repository beheerd een variant van de OpenPub plugin die niet afhankenlijk is van composer en commerciele closed source softwhare
Deze repositoery voorziet daarnaast ook in een automatische test flow voor unit en integratie testing en een locale ontwikkel omgeving
- De repository maakt gebruik van een oficial wordpress image
- De repository maakt gebruik van de open source plugin Advanced Custom Fields
For easy development an docker based wordpress environment is included, this can be started up trough afhter installing the docker desktop client.
$docker compose up
For unit testing a separate CLI based wordpress is included, this can be started trough
$docker compose -f docker-compose-cli.yml up
You can than run Wordpress CLI commands with in the container. For example, getting a list of all available plugins can be done trough
$docker-compose exec wordpress wp plugin list
Once your docker is running, you can configure the Wordpress installation:
- Navigate to
localhost/wp-admin
, initiate Wordpress and login
Note: to start this step, you're expected to have an active WordPress installation running.
- Activate the plugins: OpenPub and Advanced Custom Fields
- Navigate to "Aangepaste velden" and then to "Gereedschap"
- Upload the file
plugins/OpenPub/publication-acf-group.json
within the "Veldgroepen Importeren" option - Create one (or multiple) new users with the "KISS Redacteur" role
Note: users with the assigned role "KISS Redacteur" can now create and maintain publications. - Navigate to "OpenPub" > "Configuration" and add the gateway URI to the "API Domain" field and the gateway API key to the "API KEY" field.
Note: Users with the user role "Administrator" can create new users, an account with this role is automatically assigned once WordPress is installed. For this portion of the documentation, you're expected to be logged in as an Administrator user.
- Navigate to "Users" and click on "Add new"
- Fill the required fields (username and email), leave the other fields as-is
- Change the (default) role of "Subscriber" to "KISS Redacteur"
- Finally, click "Add New User"
Note: if you want to create another Admin user, follow the above steps and choose the role "Administrator" instead of "KISS Redacteur".
Note: removing a user can not be reverted.
- Navigate to "Users" and hover your mouse over the target user
- Click "Delete"
- Optionally, assign the user's content to another account
- Finally, click "Confirm Deletion"
Note: Users with the role "KISS Redacteur" can manage publications, an account with this role should be created as stated within #Managing users.
- Navigate to "Publications" and click "Add New"
- Add the following fields
- Title: the title of the publication (required)
- Publicatie: the content of the publication (required)
- Publicatitetype: the type of the publication ("Nieuws" or "Werkinstructie) (required)
- Skills: the skills relevant to this publication (optional)
- Einddatum: the date after which the publication is no longer visible (optional; the value must be in the future if you want your publication to be shown)
- Belangrijke publicatie: check this field to make your publication more prominent (optional)
- Finally, click "Publish"
- Navigate to the publication you want to edit by clicking on "Publications" and then clicking on the target publication
- Edit any field that needs editing (note: you cannot remove the required fields)
- Finally, click "Publish"
- Navigate to the publication you want to remove by clicking on "Publications" and then clicking on the target publication
- Click on "Move to Trash"
Note: removed publications can be found and restored in the trash, once the trash is emptied they can no longer be restored.
Optional parameter: per_page
.
GET {gateway_environment_uri}/api/openpub/openpub_type
Returns all openpub_type objects within the WordPress environment, via a gateway proxy.GET {gateway_environment_uri}/api/openpub/openpub_skill
Returns all openpub_skill objects within the WordPress environment, via a gateway proxy.