Linux 软件免费装

WP Github Gist

开发者 sudar
更新时间 2021年10月13日 20:18
PHP版本: 2.8 及以上
WordPress版本: 5.8

标签

embed github gist

下载

0.2 0.3 0.4 0.5 0.1

详情介绍:

WP Github Gist WordPress Plugin, provides the ability to embed gist and files from Github in your blog posts or pages. Even though Github doesn't provide a way to embed files, this Plugin still works by using the gist-it service. Features Embed Gist To embed a gist you have to use the following shortcode [gist id = "{GIST_ID}" file = "{GIST_FILE}" width = "{WIDTH}" height = "{HEIGHT}"] The following are the different attributes that you can use in the shortcode eg: [gist id = "12345" file = "myfile" width = "100%" height = "100%"] Embed Github files To embed a github file you have to use the following shortcode [github file = "{GITHUB_FILE}" start_line = "{START_LINE}" end_line = "{END_LINE}"] eg: [github file = "/sudar/MissileLauncher/blob/master/MissileLauncher.cpp"] if you want to embed only part of the file, then you can specify the start and end line as well [github file = "/sudar/MissileLauncher/blob/master/MissileLauncher.cpp" start_line = "10" end_line = "20"] Changing Gist-it server By default, this Plugin uses my own gist-it server which is hosted on a free Google App Engine account. If you expect significant amount of traffic to your blog, then do consider using your own gist-it server. You can follow the instructions to deploy your own gist-it server and then go to the settings page to change the url. Translation The pot file is available with the Plugin. If you are willing to do translation for the Plugin, use the pot file to create the .po files for your language and let me know. I will add it to the Plugin after giving credit to you. Support Support for the Plugin is available from the Plugin's home page. If you have any questions or suggestions, do leave a comment there or contact me in twitter.

安装:

Extract the zip file and just drop the contents in the wp-content/plugins/ directory of your WordPress installation and then activate the Plugin from Plugins page.

升级注意事项:

0.5 Added the ability to specify the height for gists and github embeds 0.4 Handle changes in github gist embed code