[wordpress插件] codeSnipscodeSnips

wordpress 插件 文章 2020-03-27 01:40 462 0 全屏看文

AI助手支持GPT4.0

评分
80
描述

Own your snippets!

拥有您的片段!

No longer require the use of a cloud service to host your snippets for you when you can host them right on your own WordPress site!

当您可以直接在自己的WordPress网站上托管代码段时,不再需要使用云服务来为您托管代码段!

codeSnips allows you to quickly add and embed code snippets to your website with syntax highlighting available for 124 languages!

codeSnips允许您使用124种语言的语法突出显示功能快速将代码段添加和嵌入到您的网站中!

codeSnips uses custom post types where you create a new snippet post, select the programming language, enter the code snippet and publish the post.

codeSnips使用自定义帖子类型,您可以在其中创建新的片段帖子,选择编程语言,输入代码片段并发布帖子。

You then can either access the snippet post directly for sharing, or embed it into another post using the shortcode.

然后,您可以直接访问摘要片段以进行共享,也可以使用简码将其嵌入到另一篇文章中。

View all of your snippets in an archived list, or even on the snippet page itself – without embedding into a new post.

在存档列表甚至是摘录页面本身中查看所有摘录-无需嵌入到新帖子中。

You can access all your snippets using a customizable pretty URL permalink.

您可以使用可自定义的漂亮URL永久链接访问所有代码段。

For example: http://yoursite.com/snippets

例如:http://yoursite.com/snippets

You can also view the raw plain text snippet directly, which is ideal for copy & pasting.

您还可以直接查看原始纯文本片段,这是复制和粘贴的理想选择。

Features:

功能:

    • Quickly add new snippets with syntax highlighting available in 124 programming languages.

    • 使用124种编程语言中的语法突出显示功能快速添加新的代码片段。

    • Plain text snippets are supported.
    • 支持纯文本片段。

    • Syntax highlighting changes dynamically if you select a new code language from the dropdown while editing.
    • 如果在编辑时从下拉菜单中选择一种新的代码语言,则语法突出显示会动态变化。

    • Embed the snippets using a shortcode that has many options.
    • 使用具有很多选项的简码嵌入代码片段。

    • You can embed multiple snippets per post.
    • 您可以在每个帖子中嵌入多个摘要。

    • Access a snippet post directly via URL.
    • 直接通过URL访问摘要帖子。

    • Access a plain text raw view of the snippet directly via URL.

    • 直接通过URL访问该片段的纯文本原始视图。

      Ideal for copying snippets.

    • 复制片段的理想选择。

    • Set a description for the snippet post that will display right on the snippet post page.
    • 设置要在摘要页面上显示的摘要说明。

    • Change the URL slug for the list of snippets to suit your site.
    • 更改片段列表的URL段以适合您的网站。

    • Work with a particular code language a lot?

    • 经常使用特定的代码语言吗?

      Select a default snippet code language.

    • 选择默认的代码段语言。

    • Each snippet also has a filename field that you can use as a reference for that snippet.
    • 每个代码段都有一个文件名字段,您可以将其用作该代码段的参考。

    • Uninstalling the plugin will clean up all data it has stored in the WordPress database.
    • 卸载插件将清除已存储在WordPress数据库中的所有数据。

    The default list of snippets will display as a post archive list using your theme.

    默认片段列表将使用您的主题显示为帖子存档列表。

    You can customize the way this list looks by simply adding a file in your theme called “archive-snippets.php”.

    您只需在主题中添加一个名为“ archive-snippets.php”的文件,即可自定义此列表的外观。

    Likewise, if you add a theme file called “single-snippets.php” it allows you to customize the way the direct snippet pageis rendered.

    同样,如果添加一个名为“ single-snippets.php”的主题文件,则它允许您自定义直接代码段页面的呈现方式。

    There are examples located included with the plugin under the “templates” folder.

    插件随附的示例位于“ templates”文件夹下。

安装步骤

Install

安装

Installing codeSnips can be done from inside your WordPress admin panel by going to Plugins > Add New and searching for “codeSnips”.

可以在WordPress管理面板中完成安装codeSnips的步骤,方法是转到“插件”>“添加新内容”并搜索“ codeSnips”。

    1. You can also manually install it by downloading the plugin from wordpress.org/plugins
    2. 您还可以通过从wordpress.org/plugins下载插件来手动安装

    3. Upload the entire codesnips folder to the /wp-content/plugins/ directory
    4. 将整个 codesnips 文件夹上载到 / wp-content / plugins / 目录

    5. Activate the plugin through the ‘Plugins’ menu in WordPress
    6. 通过WordPress中的“插件”菜单激活插件

    7. Customize the plugin from the menu by selecting codeSnips > Settings.

    8. 通过选择codeSnips>“设置”从菜单中自定义插件。

    Uninstall

    卸载

      1. Deactivate the plugin from the Plugins menu
      2. 从“插件”菜单中停用插件

      3. Select “codeSnips” from the list and select “Delete”
      4. 从列表中选择“ codeSnips”,然后选择“删除”

      5. This will delete all files from the server and all settings from the WordPress database.
      6. 这将从服务器中删除所有文件,并从WordPress数据库中删除所有设置。

下载地址
https://downloads.wordpress.org/plugin/codesnips.1.2.zip
-EOF-

AI助手支持GPT4.0