Install
This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.
Install straight from GitHub with WP-CLI:
wp plugin install https://github.com/classicpress-research/classic-code-snippets/archive/refs/heads/master.zipNo built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.
Classic Code Snippets.
This is a ClassicPress Research built plugin to find an alternative to using gist for displaying code snippets on a ClassicPress site page or post.
Credits.
Classic Code Snippets is a fork of SC Display Code (sc-display-code) originally developed by Alan and Jack Coggins at Simply Computing (https://simplycomputing.com.au).
How it works.
The plugin uses highlight.js to provide syntax highlighting.
Code snippets are saved or edited in the custom post type ccssnippet. The plugin uses a shortcode like [ccssnippet id=19] to display the code snippet on a page or post.
How to use.
- Download the plugin zip
- Install and activate the plugin via plugins admin.
- Add a code snippet via the Code Snippet post type.
-
- Paste your code generated code snippet to a post/page.
- Add the snippet with the post id of the snippet e.g. [ccssnippet id="19"] in any post or page.
- You can also view the code snippet as a raw text.