Yuki Takei %!s(int64=6) %!d(string=hai) anos
pai
achega
4850c3878b

+ 92 - 1
packages/growi-plugin-attachment-refs/README.md

@@ -20,7 +20,98 @@ Install
 Usage
 ------
 
-(TBD)
+### `ref` tag
 
+#### Syntax
+
+```
+$ref(file.txt)
+$ref(file.txt, page=/somewhere/page)
+```
+
+#### Output
+
+![here](resource/img/ref_example.png)
+
+#### Options
+
+- **`page`** : Target page path of reference file
+
+### `refs` tag
+
+#### Syntax
+
+```
+$refs(/somewhere/page, regexp=/^file.*\.txt$/)
+```
+
+#### Output
+
+![ref_example](resource/img/refs_example.png)
+
+#### Options
+
+- **`regexp`** : Regular Expression to retrieve
+- **`format`** : File format specification
+
+
+### `refimg` tag
+
+#### Syntax
+
+```
+$refimg(pict.png, width=50%, alt=Pic)
+```
+
+#### Output
+
+```html
+<img src="/attachment/xxxxx" width="50%" alt="Pic">
+```
+
+#### Options
+
+- **`width`** : width
+- **`height`** : height
+- **`max-width`** : max-width
+- **`max-height`** : max-height
+- **`alt`** : alt text
+
+
+### `refsimg` tag
+
+#### Syntax
+
+```
+$refsimg(/somewhere/page, regexp=/^.*\.png$/, max-width=200)
+```
+
+#### Output
+
+```html
+<ul>
+  <li><img src="/attachment/xxxxx" style="max-width: 200"></li>
+  <li><img src="/attachment/yyyyy" style="max-width: 200"></li>
+  <li><img src="/attachment/zzzzz" style="max-width: 200"></li>
+</ul>
+```
+
+#### Options
+
+- **`width`** : width
+- **`height`** : height
+- **`max-width`** : max-width
+- **`max-height`** : max-height
+
+
+TODO
+-----
+
+- [ ] ref
+- [ ] refs
+    - [ ] `regexp` option
+    - [ ] `format` option
+- [ ] refimg
+- [ ] refsimg
 
 [GROWI]: https://github.com/weseek/growi

BIN=BIN
packages/growi-plugin-attachment-refs/resource/img/ref_example.png


BIN=BIN
packages/growi-plugin-attachment-refs/resource/img/refs_example.png