Files
CodePress/guide/en/admin-beheerder/content-beheer.md
T
E.Noorlander 7249aca885 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
2026-08-19 10:44:32 +00:00

3.8 KiB

Content management

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:

---
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)
  • Edit — Modify existing content in the CodeMirror editor
  • Rename — Change file or folder names
  • Move — Move content to another folder
  • Delete — Remove content
  • Rename folder — Change a folder name

Editor (content-edit)

  • CodeMirror with syntax highlighting (Markdown, PHP, HTML)
  • Toolbar for quickly inserting Markdown
  • Shortcuts: Ctrl+S (save), Ctrl+N (new)

Frontmatter

The editor updates the frontmatter live when layout or plugin selection changes:

---
layout: left_sidebar
plugins:
  - HTMLBlock
  - Navigation
---

# Page title

Content...