Linux 软件免费装

MetaParsedown

开发者 Pagerange
更新时间 2019年11月5日 10:42
PHP版本: 7.0 及以上
WordPress版本: 5.2.1
版权: MIT
版权网址: 版权信息

标签

markdown github bitbucket gitlab yaml markdown-extra parsedown parsedown-extra metaparsedown

下载

1.0.0

详情介绍:

Import markdown and markdown-extra documents to Wordpress posts and pages, output as HTML, parse and save YAML front matter to post_meta, tags, and (optionally) the posts tables. How to use Simply add the metaparsedown shortcode to your post, identifying the markdown document in the url attribute: [metaparsedown url='https://gitlab.com/pagerange/docs/raw/master/markdown/test_markdown.md' /] Optionally, parse and save markdown YAML front matter to the post_meta table by adding the meta attribute. [metaparsedown url='https://gitlab.com/pagerange/docs/raw/master/markdown/test_markdown.md' meta="true" /] Optionally, overwrite the post's 'post_title' and 'post_excerpt' fields with YAML values by adding the overwrite attribute. [metaparsedown url='https://gitlab.com/pagerange/docs/raw/master/markdown/test_markdown.md' meta="true" overwrite="true" /]

安装:

Install directly from WordPress plugin repository. Or, download the ZIP file from https://github.com/pagerange/metaparsedown-wordpress/archive/master.zip

常见问题:

How can I add syntax hilighting to my markdown documents?

You can do one of two things:

  1. Add and enqueue a syntax highlighting Javascript package.
or...
  1. Use MetaParsedown's built-in syntax highlighting using the microlight js highlight package. Simply add the following code to your theme's functions.php file:
` if(function_exists('metaparsedown_plugins_url')) { function metaparsedown_load_scripts() { wp_enqueue_style('metaparsedown', metaparsedown_plugins_url('/css/style.css')); wp_enqueue_script('microlight', metaparsedown_plugins_url('/js/microlight.js'), [], null, true); wp_enqueue_script('metaparsedown', metaparsedown_plugins_url('/js/script.js'), array('microlight'), null, true); } add_action('wp_enqueue_scripts', 'metaparsedown_load_scripts', 10); } `

更新日志:

v1.0.0