Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f6d93ad

Browse files
committed
[documentation] add static
1 parent 710953c commit f6d93ad

File tree

1 file changed

+12
-24
lines changed

1 file changed

+12
-24
lines changed

docs/plugins/static.rst

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,28 @@
1-
.. note::
2-
3-
This documentation is under construction, more to come soon
4-
5-
6-
71
Static
82
======
93

10-
Serve static file from the datasource
11-
124
Features
13-
~~~~~~~~
5+
--------
146

15-
- Insert here the different feature available for this plugin
7+
- Add a handler to render static file
168

179
Configuration
18-
~~~~~~~~~~~~~
10+
-------------
1911

20-
- Insert the yaml configuration for the DI
12+
There is no configuration option. You only need to enable the plugin by adding this line into the IoC configuration file.
2113

2214
.. code-block:: yaml
2315
24-
element.plugins.cache:
25-
cache_control:
26-
- { "path": "^.*\\.(txt|jpg|png|gif|xls|doc|docx)$", "Cache-Control": ['public', 's-maxage=14212800']}
27-
- { "path": "^(blog|gallery).*", "Cache-Control": ['public', 's-maxage=3600']}
28-
- { "path": "^.*\\.rss", "Cache-Control": ['public', 's-maxage=3600']}
29-
- { "path": "^contact.*", "Cache-Control": ['private', 'must-revalidate']}
30-
- { "path": "^/$", "Cache-Control": ['public', 's-maxage=3600']}
16+
element.plugins.static:
17+
18+
Usage
19+
-----
3120

32-
Events
33-
~~~~~~
21+
Just place a store a file in the datasource and access it with a browser. That's it.
3422

35-
- List event or entry points for this plugin
23+
If the url contains the ``?mode=preview=
3624
3725
Architecture
38-
~~~~~~~~~~~~
26+
------------
3927
40-
- Provide information about how the feature is implemented
28+
The plugin provides a ``StaticNodeLoader`` to create a node object from a path, the created node type is ``element.static``.

0 commit comments

Comments
 (0)