A skeleton for SilverStripe modules.
A useful skeleton to more easily create a Silverstripe CMS Module that conform to the Module Standard., (*1)
This README contains descriptions of the parts of this module base you should customise to meet you own module needs. For example, the module name in the H1 above should be you own module name, and the description text you are reading now is where you should provide a good short explanation of what your module does., (*2)
Where possible we have included default text that can be included as is into your module and indicated in other places where you need to customise it, (*3)
Below is a template of the sections of your README.md
you should ideally include to met the Module Standard
and help others make use of your modules., (*4)
Ensure you read the
'publishing a module' guide
and update your module's composer.json
to designate your code as a Silversripe CMS module., (*5)
LICENSE.md
composer.json
with your requirements and package namepackage.json
with your requirements and package name. Run yarn install
(or remove yarn.lock
) to
ensure dependencies resolve correctlyrm -rf .git && git init
composer.json
composer.json
silverstripe/admin
:
silverstripe/admin
is installed with composer install --prefer-source
instead of the default --prefer-dist
(you can use composer reinstall silverstripe/admin --prefer-source
if you already installed it)silverstripe/admin
instead of adding them as dependencies in your package.json
file, you need to install third party dependencies in silverstripe/admin
by running yarn install
in the vendor/silverstripe/admin/
directory.See License, (*6)
This module template defaults to using the "BSD-3-Clause" license. The BSD-3 license is one of the most permissive open-source license and is used by most Silverstripe CMS module., (*7)
To publish your module under a different license:, (*8)
license.md
filelicense' key in your [
composer.json`](composer.json).You can use choosealicense.com to help you pick a suitable license for your project., (*9)
You do not need to keep this section in your README file - the LICENSE.md
file is sufficient., (*10)
Replace silverstripe-module/skeleton
in the command below with the composer name of your module., (*11)
composer require silverstripe-module/skeleton
Note: When you have completed your module, submit it to Packagist or add it as a VCS repository to your project's composer.json, pointing to the private repository URL., (*12)
Add links into your docs/<language>
folder here unless your module only requires minimal documentation
in that case, add here and remove the docs folder. You might use this as a quick table of content if you
mhave multiple documentation pages., (*13)
If your module makes use of the config API in Silverstripe CMS it's a good idea to provide an example config here that will get the module working out of the box and expose the user to the possible configuration options. Though note that in many cases simply linking to the documentation is enough., (*14)
Provide a syntax-highlighted code examples where possible., (*15)
Page: config_option: true another_config: - item1 - item2