Sharing light modules
The more the Magnolia community shares modules, the more productive all Magnolia developers become. Sharing a module as open source means the community can report problems that they discover, and even improve the module with bug fixes, new features, or translations. Light modules (as simple directories of files) provide a mechanism to package and share CMS functionality.
If you have some functionality that you think would be useful, like a component, consider sharing it with your fellow Magnolia developers. We all benefit when the Magnolia developer experience improves, the community becomes more active, and when Magnolia gets more visibility in the CMS and front-end development spaces.
Light modules can be shared with the Magnolia community using the npm package manager.
While npm was originally built as a package manager for Node.js, it has evolved to be the package manager for front-end development. It has the following benefits:
- Easy to find packages.
- Easy to publish and completely self-service.
- Wide adoption and large ecosystem of front-end tooling.
Finding light modules
Because all shared light modules are published to npm, you can search for them with the term magnolia-light-module using npm CLI or on the npm website.
Magnolia provides a set of guidelines to make sure that light modules are easy to find and use by the community, but still ensure that the creator has total flexibility in how their light module is built.
Include the magnolia-light-module keyword in the npm
Publish your light module to npm in a ready-to-use state.
A developer should be able to take the package from npm, drop it in their
Provide a complete
Strive to make your light module small and focussed, for example, providing a single component. People can more easily use your module if they understand it and it does not bring in additional things that they do not need - or might conflict with their project.
The source control project for the package could be anywhere, but Magnolia recommends Github to enable others to contribute to your project by reporting issues or even providing improvements.
Visit these pages on the Magnolia Community Wiki for guidelines on how to share light modules and how to use the light modules on npm in your project: