Download the PHP package professional-wiki/native-markdown without Composer

On this page you can find all versions of the php package professional-wiki/native-markdown. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package native-markdown

Native Markdown

GitHub Workflow Status codecov Type Coverage Latest Stable Version Download count

MediaWiki extension that makes Markdown a native content model: whole pages are stored and edited as Markdown and rendered with real wiki integration (internal links, categories, search, templates, and more), coexisting with wikitext pages on the same wiki.

Because pages are stored as plain Markdown, they are directly consumable and writable by LLMs and agents: action=raw returns clean Markdown; no wikitext conversion needed. See For AI agents and LLMs.

<img src="docs/screenshots/native-markdown-demo.gif" width="720" alt="Editing a Markdown page: clean Markdown source, then the rendered page with a table of contents, wiki links, and a category" />

Get professional support for this extension via Professional Wiki, its creators and maintainers. We provide MediaWiki Development, MediaWiki Hosting, and MediaWiki Consulting services.

Installation

Platform requirements:

Installation uses Composer with MediaWiki's built-in support for Composer.

On the command line, go to your wiki's root directory. Then run these two commands:

Then enable the extension by adding the following to the bottom of your wiki's LocalSettings.php file:

For Markdown syntax highlighting in the editor, also install the CodeEditor extension:

<img src="docs/screenshots/editor-markdown-highlighting.png" width="720" alt="The wiki edit form with Markdown syntax highlighting" />

For syntax highlighting of fenced code blocks in the rendered page, install the SyntaxHighlight extension (bundled with MediaWiki). When it is installed, a fenced block whose info string names a language is highlighted server-side with Pygments, exactly like a wikitext <syntaxhighlight> block; without it, code blocks render as plain preformatted text.

python def greet(name): print(f"Hello {name}") `

Configuration

New pages use the Markdown content model where the wiki's configuration says so. Defaults apply to page creation only; existing pages never change model implicitly. Individual pages can be switched between wikitext and Markdown (in both directions) via Special:ChangeContentModel.

Setting Default Effect
$wgNativeMarkdownNamespaces [] Namespace IDs in which new pages default to Markdown, e.g. [ NS_HELP ]
$wgNativeMarkdownEverywhere true New pages everywhere default to Markdown, the "Markdown wiki" mode (see exclusions below); set to false to keep wikitext as the default
$wgNativeMarkdownSuffixDetection false New pages whose title ends in .md default to Markdown, except in the Template and MediaWiki namespaces
$wgNativeMarkdownAllowExternalImages false Embed external ![alt](url) images; when off they render as plain links
$wgNativeMarkdownWikitextExpansion true Run {{...}} on Markdown pages through the MediaWiki parser: templates, parser functions, magic words, and Lua modules. Set to false to leave {{...}} as literal text (see Templates and parser functions)

$wgNativeMarkdownEverywhere covers the whole prose wiki but deliberately leaves some pages as wikitext: the discussion (Talk), Template, and MediaWiki namespaces, namespaces whose content model is explicitly configured elsewhere, and titles ending in .css, .js or .json. $wgNativeMarkdownSuffixDetection reads the .md suffix as a deliberate per-page choice, so it also applies inside Talk namespaces. The configuration documentation covers the exact semantics of both.

Converting existing pages

Those defaults apply at page creation only, so enabling suffix detection or adding a namespace never touches pages that already exist. The NativeMarkdown:ConvertToMarkdownModel maintenance script is the retroactive counterpart: it switches existing wikitext pages to the Markdown model using the very same rules, selecting pages via --md-suffix and/or --namespace <id> (combinable, at least one being required). It changes the content model, not the page text — the stored wikitext is then reinterpreted as Markdown and may render differently — so always start with --dry-run. Redirects are skipped, --batch-size controls how many pages each batch processes, and each conversion is an ordinary revision, reversible per page with Special:ChangeContentModel. The configuration documentation covers the exact selector semantics.

Templates and parser functions

Markdown pages can use MediaWiki's {{...}} syntax. Because expansion delegates to the wikitext parser, this covers the whole double-brace surface: templates (a wiki's shared infoboxes, citations and navboxes), parser functions ({{#if:}}, {{#switch:}}, and so on), magic words and variables ({{PAGENAME}}, {{CURRENTYEAR}}), and, where Scribunto is installed, Lua modules via {{#invoke:}}. Set $wgNativeMarkdownWikitextExpansion = false to turn this off and leave {{...}} as literal text.

Because it is the real parser, the same trust and resource model as wikitext applies: template dependencies are tracked, recursion and size limits apply, output is sanitized exactly as wikitext is, and enabling {{...}} grants a Markdown page the same capabilities a wikitext page has. Notably out of scope in this version: <ref> tags and transcluding Markdown pages with {{:Page}}. The template documentation covers the placement rules (block versus inline calls, escaping) and the full scope notes.

For AI agents and LLMs

Markdown is the native read/write format of today's language models, and Native Markdown stores pages as exactly that: plain Markdown, no wikitext wrapper. That makes a Markdown page directly consumable and directly writable by an agent, with no lossy conversion step in either direction:

Because the round trip is lossless, an agent can fetch a page as Markdown, edit it, and write it back without the content drifting through a wikitext translation. Links work the way a model already writes them: a plain [label](Page Name) link whose target names a page resolves to an internal wiki link, spaces and all. The usage documentation covers link resolution and search indexing in detail.

Comparison with other Markdown extensions

Native Markdown exists because no maintained extension makes Markdown a native content model:

See the full comparison on our website for more detail. Related but different: our ExternalContent extension embeds Markdown files from external sources (like GitHub) into wikitext pages, while Native Markdown is for the wiki's own pages being Markdown. They compose nicely.

Development

The Application layer (the whole Markdown pipeline) has no MediaWiki dependencies, so the unit suite runs standalone in the extension directory with no MediaWiki install:

Style checks and static analysis, also standalone: composer cs, composer phpstan, composer psalm.

The full suite including integration tests runs inside a MediaWiki install, from the MediaWiki root:

Release notes

Version 1.2.0 - 2026-07-17

Version 1.1.0 - 2026-07-09

Version 1.0.1 - 2026-07-07

Version 1.0.0 - 2026-07-07

Initial release for MediaWiki 1.43+ with these features:

Initial release announcement: https://professional.wiki/en/news/native-markdown-released


All versions of native-markdown with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
composer/installers Version ^2|^1.0.1
league/commonmark Version ^2.7
symfony/yaml Version ^5.4 || ^6.4 || ^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package professional-wiki/native-markdown contains the following files

Loading the files please wait ...