v2.6.2 (Lyra): Thema editor, content editor, unified scanEditorFiles
- Thema editor (thema's net zo bewerkbaar maken als plugins): bestandsbrowser zijbalk, nieuw bestand, uploaden, verwijderen, verplaatsen, SCSS compileren vanuit editor, thema activeren/ verwijderen, nieuw thema met basis-kopie, uniforme thema-structuur - Content editor (content consistent met plugins en thema's): bestandsbrowser zijbalk naast bestaande lijst weergave, nieuw bestand/map, uploaden, verwijderen, verplaatsen, mappen beheer, layout/plugins selectie, git/backup integratie in editor zijbalk - Uniformiteit: scanEditorFiles() unified scanner (scanPluginFiles/scanThemeFiles/scanContentFiles als dunne wrappers) - Media invoegen in editor: ?theme= scope voor media-list endpoint - Bug fix: thema-naam niet overgenomen bij kopiëren - title in theme.json wordt overschreven met nieuwe themanaam - Handleidingen bijgewerkt (thema-beheer.md + content-beheer.md NL/EN) - Release notes: docs/release-notes/v2.6.2.md - Pentest 30/30, WCAG 25/25
This commit is contained in:
@@ -1,6 +1,82 @@
|
||||
# Content management
|
||||
|
||||
## Managing files
|
||||
CodePress offers two views for content management:
|
||||
|
||||
1. **List view** (`/admin/content`) — classic table with filter, upload, new folder/file per folder
|
||||
2. **Content editor** (`/admin/content-files`) — file browser sidebar + CodeMirror editor (uniform with plugin/theme editors)
|
||||
|
||||
Both work side-by-side and use the same content directory. The content editor offers the same functionality as the list view, but with a nested file-tree sidebar like the plugin and theme editors — for a consistent editor experience.
|
||||
|
||||
## Content editor (content-files)
|
||||
|
||||
### File browser sidebar
|
||||
- Shows the nested file tree of `content/`
|
||||
- Hidden directories (`.bak`, `.git`) and dotfiles are skipped
|
||||
- Click a file to open it in the CodeMirror editor
|
||||
- Folders containing the active file are auto-expanded
|
||||
- Per folder there are action buttons: new file, new folder, rename, delete
|
||||
|
||||
### Editable file types
|
||||
`.md` (Markdown), `.php` (PHP), `.html` (HTML) — consistent with the existing content-edit page.
|
||||
|
||||
### Create a new file
|
||||
- Click **New file** (at the top or per folder in the sidebar)
|
||||
- Enter a path within content (e.g. `en.page` or `blog/en.post`)
|
||||
- Choose the file type (Markdown/PHP/HTML)
|
||||
- Subfolders are created automatically
|
||||
- Frontmatter with `layout`, `author_name`, `author_email`, `created` is auto-generated
|
||||
|
||||
### Upload a file
|
||||
- Click **Upload** to upload files to `content/`
|
||||
- Allowed: images, video, audio, PDF, ZIP, office docs, CSS, SCSS, JS, JSON, HTML, MD
|
||||
- Path-traversal protection: target dir must stay within `content/`
|
||||
|
||||
### Move / delete a file
|
||||
- In the file tree each file has a move button (arrows icon) and a delete button (trash)
|
||||
- **Move**: choose a target folder from the dropdown listing all folders in content
|
||||
- **Delete**: with confirmation
|
||||
|
||||
### Folder management
|
||||
- **New folder**: per folder in the sidebar or at the top
|
||||
- **Rename folder**: pencil icon per folder
|
||||
- **Delete folder**: trash icon per folder (only empty folders)
|
||||
|
||||
### Layout selection
|
||||
On the editor page you can choose the layout from the layouts defined in `theme.json` (template mapping). The selected layout is stored in the frontmatter `layout:` key.
|
||||
|
||||
### Plugins on pages
|
||||
- Content plugins (from `plugin.json` with `type: "content"`) appear in the plugin selection
|
||||
- Choose which plugins run on the page
|
||||
- The plugin selection is stored in the frontmatter `plugins:` key
|
||||
|
||||
### Git / Backup integration (Phase 5)
|
||||
At the top of the content editor there are backup and git actions:
|
||||
- **Git init**: initializes a git repository in `content/` (if none exists yet)
|
||||
- **Commit**: commits all uncommitted changes (only if there is a git repo and there are changes)
|
||||
- **Backup**: link to the backup page (`/admin/content-backup`) for ZIP backup/restore
|
||||
- The git status badge shows the current branch, whether there are uncommitted changes, and the last commit
|
||||
|
||||
### Frontmatter
|
||||
|
||||
The editor updates the frontmatter live when layout or plugin selection changes:
|
||||
|
||||
```markdown
|
||||
---
|
||||
layout: left_sidebar
|
||||
author_name: Admin
|
||||
author_email: admin@example.com
|
||||
created: 2026-08-19 10:30:25
|
||||
plugins: HTMLBlock, Navigation
|
||||
---
|
||||
|
||||
# Page title
|
||||
|
||||
Content...
|
||||
```
|
||||
|
||||
## List view (content)
|
||||
|
||||
### Managing files
|
||||
|
||||
- **New folder** — Create folder structure
|
||||
- **New file** — Create a page (`.md`, `.php`, `.html`)
|
||||
@@ -10,24 +86,12 @@
|
||||
- **Delete** — Remove content
|
||||
- **Rename folder** — Change a folder name
|
||||
|
||||
## Editor (content-edit)
|
||||
### Editor (content-edit)
|
||||
|
||||
- **CodeMirror** with syntax highlighting (Markdown, PHP, HTML)
|
||||
- **Toolbar** for quickly inserting Markdown
|
||||
- **Shortcuts**: Ctrl+S (save), Ctrl+N (new)
|
||||
|
||||
## Layout selection
|
||||
|
||||
On the content-edit page you can choose the layout from the layouts defined in `theme.json` (template mapping). The selected layout is stored in the frontmatter `layout:` key.
|
||||
|
||||
## Plugins on pages
|
||||
|
||||
- Content plugins (from `plugin.json` with `type: "content"`) appear in the plugin selection
|
||||
- Choose which plugins appear in the sidebar
|
||||
- **Order is adjustable** with up/down buttons
|
||||
- The plugin order is stored in the frontmatter `plugins:` key
|
||||
- Plugins are **hidden** when the chosen layout has no sidebar (e.g. `full_content`)
|
||||
|
||||
## Frontmatter
|
||||
|
||||
The editor updates the frontmatter live when layout or plugin selection changes:
|
||||
|
||||
Reference in New Issue
Block a user