Skip to content

jaleel-basa/typo3-ext-doc

 
 

Repository files navigation

TYPO3 Extension doc

This extension adds an option to the Help menu called Project Documentation, that lets you deliver documentation about your project from within TYPO3 CMS backend.

Help

The extension also ships with a widget for the TYPO3 Dashboard extension to give you quick access to your project documentation.

Widget

The documentation is based on Markdown. This makes it easy to write documentation while you're building a custom extension, or afterward. You could include descriptions of content elements, release notes, instructions for raising issues or anything else that needs to be documented.

The JS library docsify transforms markdown files into beautiful HTML content.

Demo

Requirements

  • TYPO3 v13 LTS
  • PHP 8.2+

Setup the extension

Download the extension. Use one of the following options:

  1. Composer: composer req georgringer/doc
  2. TER: Download extension from TER

Configuration

Switch to Install Tool/Settings and customize the global configuration. As seen in the screenshot below, the following configuration options are available:

  • Documentation Root Path: Define the path to the Markdown files
  • Documentation Name: Documentation name as it appears in the sidebar
  • Dark mode: Enable the dark mode

Extension Configuration

Updating the Docsify Bundle

The docsify library and its plugins are bundled locally in Resources/Public/docsify/ to avoid CDN dependencies. To update:

  1. Download the latest stable v4 release from jsDelivr:
    curl -sL "https://cdn.jsdelivr.net/npm/docsify@4.x.x/lib/docsify.min.js" -o Resources/Public/docsify/docsify_4.x.x.js
    curl -sL "https://cdn.jsdelivr.net/npm/docsify@4.x.x/lib/plugins/search.min.js" -o Resources/Public/docsify/search_4.x.x.js
  2. Update the <script> references in Resources/Private/Templates/Module.html to point to the new filenames.
  3. Remove the old version files.

Note: Docsify v5 is a major rewrite with breaking changes. Do not upgrade to v5 without reviewing the migration guide.

Content Security Policy

This extension ships with a Configuration/ContentSecurityPolicies.php that configures the necessary CSP rules for the TYPO3 backend. The docsify library requires:

  • script-src with nonce support for inline scripts and the docsify JS files
  • style-src with unsafe-inline because docsify dynamically injects styles at runtime

These rules are scoped to the backend only and are applied automatically when the extension is installed.

Write the documentation

Without any documentation, this extension is not useful at all :)

Check out the sample documentation included in this extension which you can use as a guide EXT:doc/Resources/Private/ExampleDocs. See also the Markdown Cheatsheet as there are some nice features available.

When you create your own documentation make sure to put the folder with your markdown files in Resources/Private. Otherwise your markdown files may be publicly accessible.

About

Project documentation for editors & integratiors, visible in the TYPO3 backend

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages

  • CSS 49.4%
  • PHP 46.5%
  • HTML 4.1%