diff --git a/docs/customization.rst b/docs/customization.rst index 27700481c..0e6740174 100644 --- a/docs/customization.rst +++ b/docs/customization.rst @@ -69,3 +69,23 @@ Just create a file ``templates/bundles/NelmioApiDocBundle/SwaggerUi/index.html.t {% endblock javascripts %} You can have a look at the `original template `_, in ``/Resources/views/SwaggerUi/index.html.twig``, to see which blocks can be overridden. + +Assets Loading Options +----------------------- + +The `html_config` settings allow you to configure how assets are loaded for the UI. The `assets_mode` option supports three values: `cdn`, `bundle`, and `offline`. + + + .. code-block:: yaml + + nelmio_api_doc: + html_config: + assets_mode: 'cdn' # Other values: 'bundle', 'offline' + +`assets_mode` +~~~~~~~~~~~~~ + +The three values are listed in `AssetsMode `_ +- **cdn**: Loads JS and CSS assets from an online CDN. +- **bundle**: Fetches assets from the bundle in the vendor directory, including updates. +- **offline**: Loads assets from the local `assets` directory, requiring the developer to update them manually.