feat: add Phases 3-5 enhancements (org profiles, pages, wiki v2 API)
Phase 3: Organization Public Profile Page - Pinned repositories with groups - Public members display with roles - API endpoints for pinned repos and groups Phase 4: Gitea Pages Foundation - Landing page templates (simple, docs, product, portfolio) - Custom domain support with verification - YAML configuration parser (.gitea/landing.yaml) - Repository settings UI for pages Phase 5: Enhanced Wiki System with V2 API - Full CRUD operations via v2 API - Full-text search with WikiIndex table - Link graph visualization - Wiki health metrics (orphaned, dead links, outdated) - Designed for external AI plugin integration - Developer guide for .NET integration 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
156
enhancements.md
156
enhancements.md
@@ -4,6 +4,162 @@
|
||||
**Date:** January 2026
|
||||
**Status:** Approved for Development
|
||||
|
||||
## Implementation Progress
|
||||
|
||||
### Phase 3: Organization Public Profile Page - COMPLETED (January 2026)
|
||||
|
||||
**New Files Created:**
|
||||
- `models/organization/org_pinned.go` - Pinned repos and groups models
|
||||
- `models/organization/org_profile.go` - Public members and org stats
|
||||
- `models/migrations/v1_26/v326.go` - Database migration for pinned tables
|
||||
- `services/org/pinned.go` - Service layer for cross-model operations
|
||||
- `routers/api/v1/org/pinned.go` - API endpoints for pinned repos/groups
|
||||
- `routers/api/v1/org/profile.go` - API endpoints for org overview
|
||||
|
||||
**Files Modified:**
|
||||
- `models/migrations/migrations.go` - Added migration 326
|
||||
- `modules/structs/org.go` - Added API structs for pinned repos, groups, members
|
||||
- `routers/api/v1/api.go` - Registered new API routes
|
||||
- `routers/web/org/home.go` - Enhanced to load pinned repos, groups, members
|
||||
- `templates/org/home.tmpl` - Added pinned repos and public members sections
|
||||
- `options/locale/locale_en-US.json` - Added locale strings
|
||||
|
||||
**API Endpoints Added:**
|
||||
- `GET /api/v1/orgs/{org}/overview` - Get organization overview
|
||||
- `GET /api/v1/orgs/{org}/pinned` - List pinned repositories
|
||||
- `POST /api/v1/orgs/{org}/pinned` - Pin a repository
|
||||
- `DELETE /api/v1/orgs/{org}/pinned/{repo}` - Unpin a repository
|
||||
- `PUT /api/v1/orgs/{org}/pinned/reorder` - Reorder pinned repos
|
||||
- `GET /api/v1/orgs/{org}/pinned/groups` - List pinned groups
|
||||
- `POST /api/v1/orgs/{org}/pinned/groups` - Create pinned group
|
||||
- `PUT /api/v1/orgs/{org}/pinned/groups/{id}` - Update pinned group
|
||||
- `DELETE /api/v1/orgs/{org}/pinned/groups/{id}` - Delete pinned group
|
||||
- `GET /api/v1/orgs/{org}/public_members/roles` - List public members with roles
|
||||
|
||||
---
|
||||
|
||||
### Phase 4: Gitea Pages Foundation - COMPLETED (January 2026)
|
||||
|
||||
**New Files Created:**
|
||||
- `models/repo/pages.go` - Pages domain and config models
|
||||
- `models/migrations/v1_26/v327.go` - Database migration for pages tables
|
||||
- `modules/pages/config.go` - Landing.yaml configuration parser
|
||||
- `modules/structs/repo_pages.go` - API structs for pages
|
||||
- `services/pages/pages.go` - Pages service layer
|
||||
- `routers/api/v1/repo/pages.go` - API endpoints for pages management
|
||||
- `routers/web/pages/pages.go` - Web router for serving landing pages
|
||||
- `routers/web/repo/setting/pages.go` - Repository settings page for Pages
|
||||
- `templates/pages/simple.tmpl` - Simple landing page template
|
||||
- `templates/pages/documentation.tmpl` - Documentation template
|
||||
- `templates/pages/product.tmpl` - Product landing template
|
||||
- `templates/pages/portfolio.tmpl` - Portfolio/gallery template
|
||||
- `templates/pages/header.tmpl` - Pages header partial
|
||||
- `templates/pages/footer.tmpl` - Pages footer partial
|
||||
- `templates/repo/settings/pages.tmpl` - Pages settings UI template
|
||||
|
||||
**Files Modified:**
|
||||
- `models/migrations/migrations.go` - Added migration 327
|
||||
- `routers/api/v1/api.go` - Registered pages API routes
|
||||
- `routers/web/web.go` - Added pages routes and import
|
||||
- `templates/repo/settings/navbar.tmpl` - Added Pages link to settings nav
|
||||
- `options/locale/locale_en-US.json` - Added Pages locale strings
|
||||
|
||||
**Web Routes Added:**
|
||||
- `GET /{username}/{reponame}/pages` - View landing page
|
||||
- `GET /{username}/{reponame}/pages/assets/*` - Serve page assets
|
||||
- `GET /{username}/{reponame}/settings/pages` - Pages settings
|
||||
- `POST /{username}/{reponame}/settings/pages` - Update pages settings
|
||||
|
||||
**API Endpoints Added:**
|
||||
- `GET /api/v1/repos/{owner}/{repo}/pages` - Get pages configuration
|
||||
- `PUT /api/v1/repos/{owner}/{repo}/pages` - Update pages configuration
|
||||
- `DELETE /api/v1/repos/{owner}/{repo}/pages` - Disable pages
|
||||
- `GET /api/v1/repos/{owner}/{repo}/pages/domains` - List custom domains
|
||||
- `POST /api/v1/repos/{owner}/{repo}/pages/domains` - Add custom domain
|
||||
- `DELETE /api/v1/repos/{owner}/{repo}/pages/domains/{domain}` - Remove domain
|
||||
- `POST /api/v1/repos/{owner}/{repo}/pages/domains/{domain}/verify` - Verify domain
|
||||
|
||||
**Features Implemented:**
|
||||
- Database models for PagesDomain and PagesConfig
|
||||
- YAML configuration parser for `.gitea/landing.yaml`
|
||||
- 4 landing page templates (simple, documentation, product, portfolio)
|
||||
- Custom domain support with verification tokens
|
||||
- SSL status tracking (pending actual Let's Encrypt integration)
|
||||
- README rendering on landing pages
|
||||
- Asset serving from repository
|
||||
- Repository settings UI for pages management
|
||||
- Enable/disable pages toggle
|
||||
- Template selection dropdown
|
||||
- Custom domain management with DNS verification instructions
|
||||
|
||||
**Future Enhancements:**
|
||||
- Let's Encrypt SSL certificate integration
|
||||
- Subdomain-based routing (e.g., repo.owner.pages.domain.com)
|
||||
- Search functionality for documentation template
|
||||
- Analytics integration
|
||||
|
||||
---
|
||||
|
||||
### Phase 5: Enhanced Wiki System with V2 API - COMPLETED (January 2026)
|
||||
|
||||
**New Files Created:**
|
||||
- `models/repo/wiki_ai.go` - WikiIndex model for full-text search
|
||||
- `models/migrations/v1_26/v328.go` - Database migration for wiki_index table
|
||||
- `modules/structs/repo_wiki_v2.go` - V2 API structs for wiki endpoints
|
||||
- `services/wiki/wiki_index.go` - Wiki indexing service (search, graph, stats)
|
||||
- `routers/api/v2/wiki.go` - V2 wiki API endpoints
|
||||
- `docs/phase5-ai-wiki-spec.md` - Phase 5 specification document
|
||||
|
||||
**Files Modified:**
|
||||
- `models/migrations/migrations.go` - Added migration 328
|
||||
- `routers/api/v2/api.go` - Registered v2 wiki routes
|
||||
- `modules/errors/codes.go` - Added wiki-related error codes
|
||||
|
||||
**V2 API Endpoints Added:**
|
||||
- `GET /api/v2/repos/{owner}/{repo}/wiki/pages` - List wiki pages with metadata
|
||||
- `GET /api/v2/repos/{owner}/{repo}/wiki/pages/{pageName}` - Get page with content & links
|
||||
- `POST /api/v2/repos/{owner}/{repo}/wiki/pages` - Create wiki page
|
||||
- `PUT /api/v2/repos/{owner}/{repo}/wiki/pages/{pageName}` - Update wiki page
|
||||
- `DELETE /api/v2/repos/{owner}/{repo}/wiki/pages/{pageName}` - Delete wiki page
|
||||
- `GET /api/v2/repos/{owner}/{repo}/wiki/search` - Full-text search
|
||||
- `GET /api/v2/repos/{owner}/{repo}/wiki/graph` - Link relationship graph
|
||||
- `GET /api/v2/repos/{owner}/{repo}/wiki/stats` - Wiki statistics and health
|
||||
- `GET /api/v2/repos/{owner}/{repo}/wiki/pages/{pageName}/revisions` - Page history
|
||||
|
||||
**Features Implemented:**
|
||||
- Full-text search across wiki pages using WikiIndex table
|
||||
- JSON content (not base64 like v1), with HTML rendering
|
||||
- Link extraction from markdown content (wiki-style and markdown links)
|
||||
- Link graph visualization (nodes and edges)
|
||||
- Incoming/outgoing link tracking
|
||||
- Wiki health metrics (orphaned pages, dead links, outdated pages, short pages)
|
||||
- Word count and statistics
|
||||
- Full CRUD operations for external tools/plugins
|
||||
- Designed for AI plugin integration (structured data for .NET AI function calling)
|
||||
|
||||
**V2 API Structs:**
|
||||
- WikiPageV2, WikiCommitV2, WikiAuthorV2
|
||||
- WikiPageListV2, WikiSearchResultV2, WikiSearchResponseV2
|
||||
- WikiGraphV2, WikiGraphNodeV2, WikiGraphEdgeV2
|
||||
- WikiStatsV2, WikiHealthV2
|
||||
- WikiOrphanedPageV2, WikiDeadLinkV2, WikiOutdatedPageV2, WikiShortPageV2
|
||||
- CreateWikiPageV2Option, UpdateWikiPageV2Option, DeleteWikiPageV2Option
|
||||
|
||||
**Error Codes Added:**
|
||||
- WIKI_PAGE_NOT_FOUND
|
||||
- WIKI_PAGE_ALREADY_EXISTS
|
||||
- WIKI_RESERVED_NAME
|
||||
- WIKI_DISABLED
|
||||
|
||||
**Design Decisions:**
|
||||
- V2 API separate from v1 to avoid interference
|
||||
- No built-in AI features - designed for external plugin integration
|
||||
- WikiIndex table for search (simplified from original AI-centric design)
|
||||
- Content hash for efficient change detection
|
||||
- Background indexing for performance
|
||||
|
||||
---
|
||||
|
||||
---
|
||||
|
||||
## Table of Contents
|
||||
|
||||
Reference in New Issue
Block a user