1# PageStats Plugin for DokuWiki
2
3This plugin counts the number of pages and media files in your DokuWiki and calculates their total size.
4
5## Features
6- Display the total number of pages.
7- Display the total size of all pages in megabytes (MB).
8- Display the total number of media files.
9- Display the total size of all media files in megabytes (MB).
10
11## Installation
121. Download the ZIP file from the latest release.
132. Go to your DokuWiki Admin -> Plugins -> Install Plugin.
143. Upload the ZIP file and activate the plugin.
15
16## Usage
17You can use the following syntax in any page to display the statistics:
18
19- `~~PAGESTATSPAGE~~`: Displays the total number of pages.
20- `~~PAGESTATSMB~~`: Displays the total size of all pages in MB.
21- `~~MEDIASTATSPAGE~~`: Displays the total number of media files.
22- `~~MEDIASTATSMB~~`: Displays the total size of all media files in MB.
23
24### Important Note:
25To avoid incorrect or outdated statistics due to page caching, add the `~~NOCACHE~~` directive at the beginning of the page where you use these commands.
26
27## Notes
28- Make sure that the `data/pages` and `data/media` directories are accessible.
29- Statistics are calculated dynamically and reflect the current state of your DokuWiki files.
30