Harrix Блог

  • Списки статей
    • Все статьи
    • IT
    • Qt
    • C++
    • Сложение двух чисел
    • Web программированиe
    • FAQ
    • Latex
    • Установка программ
    • Мифы
    • Видео
    • Про фото
  • Проекты
  • Harrix.org
  • RSS
  • Контакты

Отображение файлов Markdown *.md в WordPress

Нужно было найти решение отображения файлов *.md напрямую, плюс нужна была поддержка синтаксиса этого формата файлов. Решение под катом.

24.02.2014 Leave a Comment 4 096 просмотров

Нужно было найти решение отображения файлов *.md напрямую, плюс нужна была поддержка синтаксиса этого формата файлов. Решение под катом.

Скачать

Сварганил свой плагин, который решает задачу отображения Markdown файлов и подсветку синтаксиса.

Найти плагин можно по следующим ссылкам:

  1. https://github.com/Harrix/Harrix-MarkdownFile/releases/
  2. https://wordpress.org/plugins/harrix-markdownfile/

Данный плагин добавляет шорткод, с помощью которого добавляется Markdown файл:

1
[markdown-file][/markdown-file]

Например:

1
[markdown-file]https://raw.github.com/Harrix/Harrix-MarkdownFile/master/README.md[/markdown-file]

И под горизонтальной чертой будет отображен Markdown файл по вышеприведенному коду:


english | русский

Harrix MarkdownFile

Harrix MarkdownFile

Version 1.2

Worpress plugin. Display Markdown files with syntax highlighting in Wordpress.

The latest version of the plugin can be found here:

  • https://github.com/Harrix/Harrix-MarkdownFile/releases/
  • https://wordpress.org/plugins/harrix-markdownfile/

License: MIT.

Demo: http://blog.harrix.org/?p=1336

Usage

[markdown-file][/markdown-file]

This shortcode embeds markdown file by url.

[markdown-file]https://raw.github.com/Harrix/HarrixQtLibrary/master/README.md[/markdown-file]

Libraries

The plugin uses the libraries:

  • parsedown: http://parsedown.org/
  • highlight.js: https://highlightjs.org/

History

A detailed list of changes in the file CHANGELOG.md.

Contacts

Author: Sergienko Anton

The author can be contacted at sergienkoanton@mail.ru or http://vk.com/harrix.

Site of the author, which publishes the latest news: http://blog.harrix.org, and the projects are located at: http://harrix.org.


Статьи по теме:

  1. Как показать в Worpdress документы PDF напрямую из GitHub
  2. Функция изменения текста между тэгами в php
  3. Сложение двух чисел на HTML + javaScript
  4. Сложение двух чисел на HTML + PHP

Web программирование Html, Markdown, Wordpress

© 2014 Harrix