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.
然后,您可以直接访问摘要片段以进行共享,也可以使用简码将其嵌入到另一篇文章中。 p>
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 p>
You can also view the raw plain text snippet directly, which is ideal for copy & pasting.
您还可以直接查看原始纯文本片段,这是复制和粘贴的理想选择。 p>
Features:
功能: p>
ul>
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”文件夹下。 p>