[WordPress] 外掛分享: Mytory Markdown

前言介紹

  • 這款 WordPress 外掛「Mytory Markdown」是 2013-10-23 上架。
  • 目前有 60 個安裝啟用數。
  • 上一次更新是 2022-11-23,距離現在已有 893 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
  • 有 8 人給過評分。
  • 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。

外掛協作開發者

mytory |

外掛標籤

md | Github | markdown | markdown editor |

內容簡介

ugin allows you to convert Markdown files to HTML and display them in your post content. You can provide a URL for the Markdown file, like a GitHub raw content URL, or you can use the text mode to write the Markdown directly in the post editor. The text mode does not require a URL. Click here to watch an intro video.

Recently, a new plugin was added called Mytory Markdown for Dropbox. This new plugin uses API to access Dropbox, so if you're migrating from Public link to Dropbox API, you can now install Mytory Markdown for Dropbox and follow the instructions provided in this migration video.

Features of Mytory Markdown plugin include:

The ability to convert Markdown files to HTML and display them in your post content.
The ability to update your post by editing the file on your computer and uploading it to GitHub or editing it directly from the GitHub website.
The ability to check only the server's ETAG, not the full content, for a speedy update.
The ability to preserve revision history because the plugin only passes converted HTML content to the editor while saving work remains WordPress's responsibility.
The ability to be compatible with other plugins, as the plugin only updates post content HTML without touching the_content process (which can vary from plugin to plugin).
The use of markdown extra syntax.
The option to use a Markdown editor in the post-editing page instead of a URL.

On the admin write page, you can provide the markdown URL path and click the "update editor" button to convert the Markdown content to HTML and display it in the editor. On the view page, the plugin gets the file URL (recommended to be a GitHub raw content URL) and saves an ETAG to postmeta and the converted HTML to post_content. On subsequent requests for the post, the plugin only gets the HTTP ETAG. If the ETAG has changed, the plugin retrieves the new content and updates the post content, though if it has not changed, no action is taken.

原文外掛簡介

The plugin get markdown file URL like github raw content url. The plugin convert markdown file to html, and put it to post content.
It also provide text mode that write markdown in post edit page. Markdown text converted to html is put to editor. Text mode don’t use url.
이 플러그인은 마크다운 파일의 URL을 받아서 html로 변환하고 그걸 포스트 내용으로 집어넣습니다.
기트허브 원본 내용 URL 같은 것을 활용할 수 있습니다.
포스트 편집 페이지에서 마크다운 텍스트를 작성하는 방법도 제공합니다. 마크다운 텍스트는 html로 변환돼 에디터에 들어갑니다.
텍스트 모드를 사용하는 경우 URL은 사용하지 않습니다.
See intro video.

Now you can migrate from Public link to Dropbox API
I made up Mytory Markdown for Dropbox plugin. The plugin access Dropbox using API. So I divide the plugin to Mytory Markdown for Dropbox.
Now you can install it in plugin page. This video describe how to migrate Public link to Dropbox API.
Install Mytory Markdown for Dropbox and activate it. Then see a video below.
[Youtube https://www.youtube.com/watch?v=ZmPWMBvGuS4]
If the video doesn’t be show, click this to go to how to migration video.
이제 Public 링크를 드롭박스 API로 이전할 수 있습니다
Mytory Markdown for Dropbox 플러그인을 만들었습니다. API를 이용해서 드롭박스에 접속하는 플러그인입니다. 별도로 만들었습니다.
지금 플러그인 페이지에서 검색해 설치할 수 있습니다. 아래 비디오는 퍼블릭 링크를 드롭박스 API로 이전하는 방법을 설명합니다.
Mytory Markdown for Dropbox 플러그인을 설치한 뒤, 활성화하고 아래 비디오를 보세요.
(비디오는 위에서 보세요.)
Features

This plugin get markdown file url like github raw content url. It convert markdown file to html, and put it to post content.
You can update post by editing file on your computer. e.g. By push your content to github. Of course, you can edit directly from github website.
If post was updated once, plugin check only URL server’s ETAG not full content. It is for speed.
If ETAG was changed, plugin get new content and update post content. Or do nothing.
The plugin only pass converted html content to editor. Saving is WordPress’s work. So revision history is preserved.
The plugin is compatible with other plugins. Because the plugin updates only post content html. This doesn’t touch the_content process(vary plugins touch the process).
You can use markdown extra syntax.
It provide markdown editor that can use in post editing page instead of url.

Logic
On admin page
On admin write page, put markdown url path. And click ‘update editor’ button. So markdown content converted to html is putted to editor. See screenshot 1.
On view page
This plugin get file url(Github raw content url is recommended). And save header’s etag to postmeta and converted html to post_content.
Next time on request same post, first this plugin olny get http etag.
If changed etag, get md content and save again, or get html from post_content.
This plugin divide title and content from md file
If markdown file has h1 this plugin puts first h1 string to post_title. Of course, remove the h1 from post_content so don’t print title twice.
Source Code
Mytory Markdown Github
You can use Multimarkdown 6
You can use the Muitimarkdown if you install it on your server. ((Website)[https://fletcher.github.io/MultiMarkdown-6/])

Multimarkdown option will be enabled if a multimarkdown execution is on OS PATH and web server can run it.

Otherwise, you can define MYTORY_MARKDOWN_MULTIMARKDOWN_EXECUTION constant on wp-config.php.
ex) define('MYTORY_MARKDOWN_MULTIMARKDOWN_EXECUTION', '/opt/multimarkdown/bin/multimarkdown');

各版本下載點

  • 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
  • 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Mytory Markdown」來進行安裝。

(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。


1.1 | 1.2 | 1.3 | 1.5 | 1.2.1 | 1.2.2 | 1.3.1 | 1.3.2 | 1.3.3 | 1.3.4 | 1.4.0 | 1.4.1 | 1.4.2 | 1.4.3 | 1.5.1 | 1.5.2 | 1.5.3 | 1.6.0 | 1.6.1 | 1.6.2 | 1.6.3 | 1.6.4 | 1.6.5 | trunk |

延伸相關外掛(你可能也想知道)

  • WP Githuber MD – WordPress Markdown Editor 》一個全方位的 WordPress Markdown 外掛程式,提供多種功能,包括 Markdown 編輯器、即時預覽、圖片貼上、HTML 到 Markdown 換算工具等等。, 如需詳細資訊,請...。
  • Ultimate Markdown – Markdown Editor, Importer, & Exporter 》Ultimate Markdown 是一個 WordPress 外掛,可以讓您使用流行的 Markdown 語法來創建 WordPress 文章。, 安裝這個外掛後,您可以:, , 從現有的 Markdown 檔...。
  • WP Markdown Editor (Formerly Dark Mode) 》如果你想在 WordPress 快速編輯內容,而不用考慮區塊,那麼 WP Markdown Editor 就是您的完美選擇!使用最酷的編輯器-WP Markdown Editor,獲取身臨其境、寧...。

文章
Filter
Apply Filters
Mastodon