Plugins should be able to download frontend assets #1355
Replies: 5 comments
-
In terms of privacy / security this approach only changes the scope - from website visitors to the site owner computer but with higher impact in this case (in some edge-cases it can lead to serious vulnerabilities). But it can also lead to many issues with compatibility, because updated dependencies can introduce errors or changed functionality. In the predictable future we have no plans for such functionality. There is one issue with the current state of Publii - there is no update center, but we have plans to introduce this feature in few steps between v.0.46 and v.0.48 what will solve issue with detecting plugins to update. |
Beta Was this translation helpful? Give feedback.
-
An excerpt from my DataTables plugin:
|
Beta Was this translation helpful? Give feedback.
-
Didn't see your reply while posting.
In this case, a new version of the plugin would be released. Take a look at my init function, if the name of the class or the initialization were to change, then it would only be a small adjustment. A loader could also be included with a CDN package. The install/updates would be initiated by the user; the plugins only provide the URLs. Nothing happens here without action from the user and it's basically the same as installing a ZIP file with unknown content. Personally, I have no problem with this decision and I am also very grateful for the time and effort you put into Publii. But maybe leave this issue to get other users' opinions?
|
Beta Was this translation helpful? Give feedback.
-
@HowToMeetLadies - I have converted the issue to discussion - then users can vote for this topic :) |
Beta Was this translation helpful? Give feedback.
-
A small addition: When declaring, you could specify a stable version and insert a placeholder in the URL. $plugin/config.json
It would be up to the user to choose whether to replace "latest" (just show a warning) or the value of stable. Not a bit more. I'm also happy to contribute a part, I'm also good with Vue, but I can't currently compile Electron apps (Stone Age Macbook).. ymmv |
Beta Was this translation helpful? Give feedback.
-
Feature Description
As a plugin developer, I would like to be provided with an interface through which I can request files to be downloaded.
For every change to a dependency, a new plugin version must also be released, although the functionality of the plugin itself usually does not change.
Ideally, plugins would only be able to register URLs and these would then be displayed collectively for all plugins in a CDN section. In the CDN section, the user would then have the option to select these, as a package or individually, depending on the plugin's specifications. For example, optional components could be individually selectable and a package would be a predefined list of urls (script + style + assets). Plugins could decide whether to include bundled (front-assets) or downloaded assets based on the selection. Alternatively, the direct integration of assets from a CDN can be explicitly set by the user in the plugin configuration (if provided). Bonus: You could also let the user enter their own urls in the CDN section.
A simple addition of a downloadFile function for the plugin API would also be sufficient. The main thing is that I would have an indicator as to whether the respective file was loaded or not. 🙏
Beta Was this translation helpful? Give feedback.
All reactions