{"title":"Fedwiki Reindex Skill","story":[{"type":"markdown","id":"da74437779547074","text":"The `fedwiki-reindex` skill rebuilds the sitemap and search index for a local federated wiki domain. It is needed because the wiki server caches these indexes in each domain's `status/` folder and does not detect when [[Claude Code]] writes page JSON files directly to disk."},{"type":"markdown","id":"e9e87bf3facfe4ae","text":"## Why It's Needed\n\nWhen a page is created or edited through the wiki browser UI, the server updates its index automatically. When Claude writes a page file directly to `~/Music/Guides/Private/{domain}/pages/`, the server doesn't know — two cached files in the `status/` folder go stale:\n\n- `sitemap.json` — the page list used for navigation and federation neighbourhood\n- `site-index.json` — the full-text search index"},{"type":"markdown","id":"5b76033ffcfa0a75","text":"## How It Works\n\nDelete the stale index files from `status/`, then `curl` the sitemap endpoint to trigger the server to rebuild them immediately."},{"type":"code","id":"cc0266cf31babe6c","text":"FARM=\"$HOME/Music/Guides/Private\"\nDOMAIN=\"localhost\"\n\nrm -f \"$FARM/$DOMAIN/status/sitemap.json\"\nrm -f \"$FARM/$DOMAIN/status/site-index.json\"\ncurl -s \"http://$DOMAIN/system/sitemap.json\" > /dev/null\necho \"Reindexed $DOMAIN\""},{"type":"markdown","id":"8b980733805730c4","text":"## When to Use\n\n- After Claude creates or edits page JSON files directly on disk\n- After bulk import of pages\n- When the wiki's page list or search results appear incomplete or stale"},{"type":"markdown","id":"305c76b74c2a045d","text":"## Public Wikis — nextcloud-reindex\n\nFor public wikis in `~/Nextcloud/fedwiki/`, the remote server needs its index rebuilt separately using `nextcloud-reindex`. This deletes the index files via WebDAV and triggers a rebuild on the remote server:\n\n```bash\nnextcloud-reindex skill.fedwiki.club\n```\n\nThis is needed after bulk page changes — e.g. after running `fedwiki-merge-move` or `fedwiki-merge-trash`."},{"type":"markdown","id":"c48d9f9e226458bf","text":"# Assets"},{"type":"assets","id":"ac30ad7fec1e7c79","text":"fedwiki-reindex-skill"},{"type":"markdown","id":"305c76b74c2a045d","text":"## Related Skills\n\n- [[Fedwiki Page Skill]] — always call this skill after writing pages to a private wiki\n- [[Fedwiki NewWiki Skill]] — create a new wiki domain\n- [[Nextcloud Push Script]] — push public wiki pages when sync is stuck\n- [[Fedwiki Merge Skill]] — uses nextcloud-reindex after bulk page moves"}],"journal":[{"type":"create","item":{"title":"Fedwiki Reindex Skill","story":[{"type":"markdown","id":"da74437779547074","text":"The fedwiki-reindex skill rebuilds the sitemap and search index for a local federated wiki domain."}]},"date":1780861154000,"certificate":"from marvin"},{"type":"add","id":"c48d9f9e226458bf","item":{"type":"markdown","id":"c48d9f9e226458bf","text":"# Assets"},"date":1782590716837,"certificate":"from marvin","after":"305c76b74c2a045d"},{"type":"add","id":"ac30ad7fec1e7c79","item":{"type":"assets","id":"ac30ad7fec1e7c79","text":"fedwiki-reindex-skill"},"after":"c48d9f9e226458bf","date":1782590716837,"certificate":"from marvin"}]}