Linux 软件免费装
Banner图

GetGit

开发者 claycarpenter
更新时间 2013年3月20日 00:46
PHP版本: 3.5.1 及以上
WordPress版本: 3.5.1
版权: GPLv3
版权网址: 版权信息

标签

embed code snippet github repositories

下载

0.1 0.2 0.3

详情介绍:

This plugin embeds the content of a public GitHub repository into your WordPress posts. It's capable of retrieving either the full content or a snippet of a file. The code will be displayed with syntax highlighting and line numbers. Now supports content caching for improved page responsiveness and load times. Syntax highlighting is provided by the Sunlight JS syntax highlighter. Many thanks to those involved in that project! Usage This plugin registers a shortcode that allows for embedding GitHub repo content into blog posts. To embed content into your post, use the github shortcode like so: [github userid="[target user id]" repoid="[target repo id]" path="[path to content]" language="[language of target content]"] Attributes used by the github shortcode: Examples Retrieve src/support.js from the jQuery project repo: [getgit repoid="jquery" userid="jquery" path="src/support.js" language="javascript"] Retrieve lines 39 through 64 of this plugin's content retrieval class: [getgit repoid=github-wordpress-plugin userid=claycarpenter path="src/php/github_repo_content_retriever.php" language="php" startloc=39 stoploc=64]

安装:

To install this plugin:
  1. Upload the plugin archive ZIP (getgit.zip) to the /wp-content/plugins/ directory.
  2. Activate the GetGit plugin through the 'Plugins' menu in WordPress.
  3. Add the github shortcode to your blog posts, as outlined in the Description section.

屏幕截图:

  • A snippet of content retrieval code from this plugin, with PHP syntax highlighting.
  • A snippet of a jQuery file, with JavaScript syntax highlighting.
  • The plugin settings page.

常见问题:

Does this plugin support configurable syntax highlighting?

Currently, the syntax highlighting style choice is not user configurable. However, such functionality is expected in future releases.

更新日志:

0.3 0.2 0.1