承接 oliverthiele/ot-markdown 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

oliverthiele/ot-markdown

Composer 安装命令:

composer require oliverthiele/ot-markdown

包简介

CE Markdown - Content Element and ViewHelper for Markdown with optional syntax highlighting.

README 文档

README

Adds a Markdown content element and a Fluid ViewHelper to TYPO3 v13 and v14. Supports inline Markdown and .md files from Fileadmin, rendered via league/commonmark with optional Prism.js syntax highlighting.

TYPO3 Packagist Version PHP License Changelog

Features

  • TYPO3 v13+ compatible (Site Set ready)
  • Inline or file-based Markdown rendering (.md, .markdown, .txt)
  • Optional syntax highlighting via Prism.js (CDN toggle)
  • Frontmatter metadata support (title, author, …)
  • Accessible output using semantic <section> and <figure> elements
  • Reusable MarkdownViewHelper for custom Fluid templates
  • Configurable via Site Set settings and TypoScript

Requirements

Requirement Version
TYPO3 ^13.4 | ^14.3
PHP >=8.3
league/commonmark ^2.7

Installation

composer require oliverthiele/ot-markdown

After installation, activate the Site Set "OtMarkdown" for your site in the TYPO3 backend.

Configuration

Site Set Settings

Key Type Default Description
OtMarkdown.useCdnForPrism bool true Load Prism.js from CDN

TypoScript

The TypoScript is auto-included via the Site Set. For manual integration without Site Set:

@import 'EXT:ot_markdown/Configuration/TypoScript/constants.typoscript'
@import 'EXT:ot_markdown/Configuration/TypoScript/setup.typoscript'

Default content element configuration:

tt_content.ot_markdown =< lib.contentElement
tt_content.ot_markdown {
    templateName = Markdown
    dataProcessing {
        10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
        10.references.fieldName = assets
        10.as = markdownFiles
    }
}

Usage

Content Element

Select "Markdown" as content type (CType = ot_markdown) in the TYPO3 backend. Choose between:

  • Inline — enter Markdown directly in the text field
  • File — select a .md, .markdown, or .txt file from Fileadmin

ViewHelper

{namespace ot=OliverThiele\OtMarkdown\ViewHelpers}

<ot:markdown text="{data.bodytext}"/>

<ot:markdown file="{file}" as="output">
    <f:format.raw>{output.html}</f:format.raw>
</ot:markdown>

Access frontmatter metadata via {output.frontmatter.title}, {output.frontmatter.author}, etc.

PHP API

use OliverThiele\OtMarkdown\Service\MarkdownService;
use TYPO3\CMS\Core\Utility\GeneralUtility;

$service = GeneralUtility::makeInstance(MarkdownService::class);
$html = $service->render('# Hello World');

License

GPL-2.0-or-later — © 2025 Oliver Thiele

统计信息

  • 总下载量: 445
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0-or-later
  • 更新时间: 2025-10-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固