Shortcode
A collection of useful snippets and code examples for Artisan, Blade, CLI, CSS, GIT, HTML, JavaScript, Laravel, Liquid, Markdown, NodeJS, VueJS, PHP, WordPress, WP-CLI and more.
Install / Use
/learn @proochster/ShortcodeREADME
<SHORTCODE>
https://shortcode.dev
Adding a new short code
-
Create a new html file in the collection folder, i.e:
_collections _laravel new-short-code.html -
Use this as a template for the front matter:
--- title: new short code description: Short code description. tags: html second-tag third-tag date: YYYY-MM-DD --- // Add the short code body here. -
When ready, submit a pull request to the
devbranch (https://github.com/proochster/shortcode/tree/dev).
Creating a new collection
-
Add the new collection in
/_config.ymlfile following this structure.HTMLcollection was used in the example below. For the collection icon checkout Font Awesome.collections: html: output: true link: html-cheatsheet icon: fab fa-html5 css: ... -
Under the defaults section in the _config.yml add the scope record following the example below.
defaults: - scope: type: html values: layout: shortcode type: html -
Create new folder in the
/_collections/directory:_collections _html -
Create a landing page for the new collection in the root directory i.e.
code_somecollection.htmland follow this front matter structure:--- layout: codes title: Some collection cheatsheet permalink: somecollection-cheatsheet group: wordpress --- -
Add another markdown highlight case in the
/_includes/code-highlight.htmllike so:{% when 'html' %}{% highlight html %}{{ code-content }}{% endhighlight %} -
When ready submit a pull request to the
devbranch (https://github.com/proochster/shortcode/tree/dev).
Jekyll
Requirements: Ruby, Gems
Add shortcode entry to your hosts list.
Install bundler gem install bundler jekyll
Install project bundle install
Use bundle exec jekyll serve when running for the first time or after _config.yml has been changed.
Otherwise use jekyll serve or the short version jekyll s
Only compile the latest changes:
bundle exec jekyll serve --incremental
Workbox CLI
Command line interface tool for Progressive Web Apps https://developers.google.com/web/tools/workbox/modules/workbox-cli
Initial workbox wizard setup command. This will generate the workbox-config.js file.
workbox wizard
To build service worker run
workbox generateSW workbox-config.js
Related Skills
node-connect
349.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
109.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
349.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
349.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
