xref: /plugin/visualindex/README_EN.md (revision 3c9c7f3beeea1dce712c368cb507b309c63f5d06)
1*3c9c7f3bSLORTET# Visualindex
2*3c9c7f3bSLORTET
3*3c9c7f3bSLORTETThe **visualindex** plugin displays a visual index of pages (or media files) from a DokuWiki namespace.
4*3c9c7f3bSLORTET
5*3c9c7f3bSLORTETIt is compatible with:
6*3c9c7f3bSLORTET- the classic editor;
7*3c9c7f3bSLORTET- ProseMirror.
8*3c9c7f3bSLORTET
9*3c9c7f3bSLORTET## How It Works
10*3c9c7f3bSLORTET
11*3c9c7f3bSLORTETThe plugin reads a namespace, builds a list of readable items, then displays tiles with:
12*3c9c7f3bSLORTET- an image;
13*3c9c7f3bSLORTET- a title;
14*3c9c7f3bSLORTET- a link to the page or media file.
15*3c9c7f3bSLORTET
16*3c9c7f3bSLORTETIf no item is available, a translated message is displayed.
17*3c9c7f3bSLORTET
18*3c9c7f3bSLORTET## Syntax
19*3c9c7f3bSLORTET
20*3c9c7f3bSLORTETBasic syntax:
21*3c9c7f3bSLORTET
22*3c9c7f3bSLORTET```txt
23*3c9c7f3bSLORTET{{visualindex>namespace}}
24*3c9c7f3bSLORTET```
25*3c9c7f3bSLORTET
26*3c9c7f3bSLORTETUseful examples:
27*3c9c7f3bSLORTET
28*3c9c7f3bSLORTET```txt
29*3c9c7f3bSLORTET{{visualindex>.}}
30*3c9c7f3bSLORTET{{visualindex>wiki}}
31*3c9c7f3bSLORTET{{visualindex>wiki;filter=start|syntax*}}
32*3c9c7f3bSLORTET{{visualindex>wiki;desc=1}}
33*3c9c7f3bSLORTET{{visualindex>wiki;medias=1}}
34*3c9c7f3bSLORTET{{visualindex>.;filter=guide*;desc=1;medias=1}}
35*3c9c7f3bSLORTET```
36*3c9c7f3bSLORTET
37*3c9c7f3bSLORTETSupported options:
38*3c9c7f3bSLORTET- `filter`: simple filter with `*` (e.g. `guide*|doc*`);
39*3c9c7f3bSLORTET- `desc`: descending order (`1` / `true`);
40*3c9c7f3bSLORTET- `medias`: show namespace media (`1` / `true`).
41*3c9c7f3bSLORTET
42*3c9c7f3bSLORTETSpecial namespace values:
43*3c9c7f3bSLORTET- `.`: current namespace;
44*3c9c7f3bSLORTET- `~sub:folder`: namespace relative to the current namespace.
45*3c9c7f3bSLORTET
46*3c9c7f3bSLORTET## Configuration Parameters
47*3c9c7f3bSLORTET
48*3c9c7f3bSLORTETIn the configuration manager:
49*3c9c7f3bSLORTET
50*3c9c7f3bSLORTET- `taille_icone`: icon size (e.g. `100px`);
51*3c9c7f3bSLORTET- `taille_texte`: text size (e.g. `13px`);
52*3c9c7f3bSLORTET- `couleur_texte`: text color (hex, rgb/rgba, or CSS color name);
53*3c9c7f3bSLORTET- `skip_file`: regular expression for pages to ignore;
54*3c9c7f3bSLORTET- `show_in_editor_menu`: show Visualindex in editor menus (classic and ProseMirror);
55*3c9c7f3bSLORTET- `use_pagesicon`: use the `pagesicon` helper when available;
56*3c9c7f3bSLORTET- `default_image`: default image (media ID, e.g. `wiki:logo.png`); if empty, the plugin internal image is used.
57*3c9c7f3bSLORTET
58*3c9c7f3bSLORTET## Integration with pagesicon
59*3c9c7f3bSLORTET
60*3c9c7f3bSLORTETIf the `pagesicon` plugin is present and enabled through `use_pagesicon`:
61*3c9c7f3bSLORTET- Visualindex retrieves page icons through the helper;
62*3c9c7f3bSLORTET- Visualindex also retrieves media icons;
63*3c9c7f3bSLORTET- if no icon is found, the default fallback is used.
64*3c9c7f3bSLORTET
65*3c9c7f3bSLORTETFallback order:
66*3c9c7f3bSLORTET1. icon provided by `pagesicon`;
67*3c9c7f3bSLORTET2. Visualindex `default_image`;
68*3c9c7f3bSLORTET3. plugin internal image (`images/default_image.png`).
69*3c9c7f3bSLORTET
70*3c9c7f3bSLORTET## ProseMirror
71*3c9c7f3bSLORTET
72*3c9c7f3bSLORTETThe plugin exposes a `Visualindex` button in ProseMirror (when `show_in_editor_menu` is enabled), with a configuration popup.
73*3c9c7f3bSLORTET
74*3c9c7f3bSLORTETThe popup lets you configure:
75*3c9c7f3bSLORTET- namespace;
76*3c9c7f3bSLORTET- filter;
77*3c9c7f3bSLORTET- descending order;
78*3c9c7f3bSLORTET- media display.
79