- Shortcodes
This commit is contained in:
@@ -10,6 +10,15 @@ Posts and static pages are Markdown `.txt` files with front matter. Comments are
|
||||
|
||||
Post and page bodies are treated as trusted author content. Markdown is rendered while allowing raw HTML, iframes, JavaScript, and executable PHP blocks inside the `.txt` files.
|
||||
|
||||
Shortcodes are declared in `config/shortcodes.php` as a PHP array, with optional JSON overrides in `config/shortcodes.json`. Built-in examples:
|
||||
|
||||
```text
|
||||
[youtube=dQw4w9WgXcQ]
|
||||
[video poster=poster.jpg file=file.mp4]
|
||||
```
|
||||
|
||||
`[video]` renders an iframe pointed at `lone-embed.php`, which serves a full-frame HTML5 video player. Bare filenames resolve from `bl-content/uploads`.
|
||||
|
||||
## Requirements
|
||||
|
||||
- PHP 8.1 or newer
|
||||
|
||||
Reference in New Issue
Block a user