Currently (it seems) all custom scripts are added to the Actions box and available in all content types. Shutting it off is only possible by removing that meta box from the view (with a custom view mode for instance).
The following is a current sample in my system:
I would love to remove the "Optimize slug" button. It is an internal action, so I can't just delete the config option
Starting and stopping the server might be done outside of the CMS. Even if not, it would use up less space by being a "switch" button. "Start server" if it's off, "Stop server" if it's on.
"Open Preview" should be only available when the server is running
Custom action youtube - I would love to show these buttons only where they are needed, based on content type. The youtube preview button for instance would show up only in type: video posts.
Or: based on frontmatter. The unsplash button only if a field/group unsplash is defined in the frontmatter of the current post.
In general the sidebar tends to be very long and cluttered on post pages. Showing things conditionally or collapse all boxes might help.
In short:
custom actions based on content type
disable/enable internal actions (like server start/stop) and optimize how they show up
conditional rules where to show custom actions based on frontmatter variables
a config option to collapse all boxes by default (or all boxes after a selected one) would be nice.
Currently (it seems) all [custom scripts](https://frontmatter.codes/docs/custom-actions) are added to the Actions box and available in all content types. Shutting it off is only possible by removing that meta box from the view (with a custom view mode for instance).
The following is a current sample in my system:

- I would love to remove the "Optimize slug" button. It is an internal action, so I can't just delete the config option
- Starting and stopping the server might be done outside of the CMS. Even if not, it would use up less space by being a "switch" button. "Start server" if it's off, "Stop server" if it's on.
- "Open Preview" should be only available when the server is running
- Custom action youtube - I would love to show these buttons only where they are needed, based on content type. The youtube preview button for instance would show up only in `type: video` posts.
- Or: based on frontmatter. The unsplash button only if a field/group `unsplash` is defined in the frontmatter of the current post.
In general the sidebar tends to be very long and cluttered on post pages. Showing things conditionally or collapse all boxes might help.
In short:
- custom actions based on content type
- disable/enable internal actions (like server start/stop) and optimize how they show up
- conditional rules where to show custom actions based on frontmatter variables
- a config option to collapse all boxes by default (or all boxes after a selected one) would be nice.
<!-- github-sync-id:1600995970 -->
Thanks, @davidsneighbour; some enhancements can be made to the custom actions.
Custom actions based on the content-type is a good idea!
Disable/enable internal actions is a good idea, I will check what I can do for this
Wouldn't you already have the field defined in the content-type? It might be easier to specify multiple content types for a script.
Not sure if I understand this, can you clarify this a bit?
Something else: knowing when the server is running is a bit trickier (for the stop and preview actions), as some only sometimes use the start action. You could run it separately.
Thanks, @davidsneighbour; some enhancements can be made to the custom actions.
- Custom actions based on the content-type is a good idea!
- Disable/enable internal actions is a good idea, I will check what I can do for this
- Wouldn't you already have the field defined in the content-type? It might be easier to specify multiple content types for a script.
- Not sure if I understand this, can you clarify this a bit?
Something else: knowing when the server is running is a bit trickier (for the stop and preview actions), as some only sometimes use the start action. You could run it separately.
<!-- github-comment-id:1458313610 -->
Something else: knowing when the server is running is a bit trickier (for the stop and preview actions), as some only sometimes use the start action. You could run it separately.
> Something else: knowing when the server is running is a bit trickier (for the stop and preview actions), as some only sometimes use the start action. You could run it separately.
This has been implemented #652
<!-- github-comment-id:1744850527 -->
The ability to hide custom actions per content type has been added:
{"frontMatter.custom.scripts":[{"title":"Generate social image","script":"./scripts/social-img.js","command":"~/.nvm/versions/node/v16.19.0/bin/node","contentTypes":["post"]}]}
All you need to do is add the contentTypes property to the custom script and specify the content type names for which you want to enable the custom script. Once you do this, the custom action will only appear for the list of specified content types in the panel.
The ability to hide custom actions per content type has been added:
```json
{
"frontMatter.custom.scripts": [{
"title": "Generate social image",
"script": "./scripts/social-img.js",
"command": "~/.nvm/versions/node/v16.19.0/bin/node",
"contentTypes": ["post"]
}]
}
```
All you need to do is add the `contentTypes` property to the custom script and specify the content type names for which you want to enable the custom script. Once you do this, the custom action will only appear for the list of specified content types in the panel.
<!-- github-comment-id:1746546753 -->
A new setting `frontMatter.panel.actions.disabled` is available for defining which actions you want to hide:
```json
{
"frontMatter.panel.actions.disabled": [
"openDashboard",
"createContent",
"optimizeSlug",
"preview",
"openOnWebsite",
"startStopServer",
"customActions"
]
}
```
<!-- github-comment-id:1746698841 -->
To collapse all zones, you can use the following action:
To collapse all zones, you can use the following action:

<!-- github-comment-id:1746764430 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Currently (it seems) all custom scripts are added to the Actions box and available in all content types. Shutting it off is only possible by removing that meta box from the view (with a custom view mode for instance).
The following is a current sample in my system:
type: videoposts.unsplashis defined in the frontmatter of the current post.In general the sidebar tends to be very long and cluttered on post pages. Showing things conditionally or collapse all boxes might help.
In short:
Thanks, @davidsneighbour; some enhancements can be made to the custom actions.
Something else: knowing when the server is running is a bit trickier (for the stop and preview actions), as some only sometimes use the start action. You could run it separately.
This has been implemented #652
The ability to hide custom actions per content type has been added:
All you need to do is add the
contentTypesproperty to the custom script and specify the content type names for which you want to enable the custom script. Once you do this, the custom action will only appear for the list of specified content types in the panel.A new setting
frontMatter.panel.actions.disabledis available for defining which actions you want to hide:To collapse all zones, you can use the following action:
I am sorry, I never saw your answers to my report. Those all are good options, thanks for the hard work :)