1
0
Fork 0
mirror of https://github.com/sbrl/Pepperminty-Wiki.git synced 2024-11-21 16:13:00 +00:00

docs/index references: add short bullet point summary at the top of the page

This commit is contained in:
Starbeamrainbowlabs 2020-08-18 15:38:33 +01:00
parent 91ac0fe5cc
commit a640a7bb93
Signed by: sbrl
GPG key ID: 1BE5172E637709C2
2 changed files with 11 additions and 0 deletions

View file

@ -1,4 +1,10 @@
# `pageindex.json` Reference
- **Filename:** `pageindex.json`
- **Index Type:** Primary
- **Location:** Data directory root
- **Purpose:** Storing metadata about pages
When working with Pepperminty Wiki, inevitably there will come a point when you'll be interested in the data structures that Pepperminty Wiki uses to store it's primary (i.e. doesn't exist elsewhere) data. Here, the structure of arguably the most important index is discussed - `pageindex.json`.
As the name suggests, `pageindex.json` (henceforth called simply "the page index") contains an index of all the pages present in a wiki and their metadata. It's structure is 1 big JSON object, like this:

View file

@ -1,5 +1,10 @@
# `recentchanges.json` Reference
- **Filename:** `recentchanges.json`
- **Index Type:** Primary
- **Location:** Data directory root
- **Purpose:** Storing a list of recent changes
Like the page index stored in [`pageindex.json`](./60-ref-pageindex.md), `recentchanges.json` contains a list of all the recent changes on a wiki. It is located in the root of the data directory (along with the page index), and is formatted as JSON (as you might expect). It consists of an array of objects in reverse-chronological order - i.e. the most recent change is at the top of the file. Not _every_ change will be documented here however - as wikis may limit the number of recent changes stored (the default is currently `512` - this is controlled by the `[max_recent_changes`](https://starbeamrainbowlabs.com/labs/peppermint/peppermint-config-info.php#config_max_recent_changes) setting).
Note that if you are writing a module, you should **NOT** write to the recent changes list directly. Instead, you should use the `add_recent_change()` method provided by the `feature-recent-changes` module.