-
install plugin
yarn add growi-plugin-attachment-refs yarn add -D react-images@1.0.0 react-motion
-
build client app (see official documents)
$ref(file.txt)
$ref(file.txt, page=/somewhere/page)
file: File name of reference file (default: the first argument)page: Target page path of reference file (default: current page)
$refs(/somewhere/page, regexp=/^file.*\.txt$/)
page: Target page path to search attachments (default: the first argument || current page)prefix: Page prefix to search attachmentsdepth: page depth to search attachmentsregexp: Regular Expression to retrieve- (TBD)
format: File format filtering
$refimg(pict.png, width=50%, alt=Pic)
file: File name of reference file (default: the first argument)width: widthheight: heightmax-width: max-widthmax-height: max-heightalt: alt text
$refsimg(/somewhere/page, regexp=/^.*\.png$/, max-width=200)
$refsimg(prefix=/somewhere, grid=autofill, grid-gap=1px)
page: Target page path to search attachments (default: the first argument || current page)prefix: Page prefix to search attachmentsdepth: page depth to search attachmentsregexp: Regular Expression to retrieve- (TBD)
format: File format filtering width: width- e.g.
width=200px,width=50%
- e.g.
height: height- e.g.
height=100px
- e.g.
max-width: max-width- e.g.
max-width=200px,max-width=50%
- e.g.
max-height: max-height- e.g.
max-height=100px
- e.g.
display:displayproperty for image (usedisplay: blockwhen undefined)- This option is disabled when
gridoption is set.
- This option is disabled when
grid: Grid layout settingsautofill: Grid layout with auto filling with 64px tracksautofill-xs: Grid layout with auto filling with 32px tracksautofill-sm: Grid layout with auto filling with 48px tracksautofill-md: Grid layout with auto filling with 64px tracksautofill-lg: Grid layout with auto filling with 128px tracksautofill-xl: Grid layout with auto filling with 192px trackscol-2: Grid layout with 2 columnscol-3: Grid layout with 3 columnscol-4: Grid layout with 4 columnscol-5: Grid layout with 5 columnscol-6: Grid layout with 6 columns
grid-gap: Grid gap- e.g.
grid-gap=1px
- e.g.
no-carousel: Omit carousel function and just show images
Short-hand for $refsimg(grid=col4, grid-gap=1px).
$gallery(prefix=/somewhere/page)
See the options of refsimg
-
formatoption