[WordPress] 外掛分享: WP-ShkShell

首頁外掛目錄 › WP-ShkShell
10+
安裝啟用
尚無評分
5113 天前
最後更新
問題解決
WordPress 2.0+ v0.6.0 上架:2012-02-26

內容簡介

WP-ShkShell 提供一個類似終端機的方塊,可在頁面或文章中嵌入終端機命令。
它還支持多行、多種命令和語法高亮。

此代碼是 WP-Terminal (https://wordpress.org/extend/plugins/wp-terminal/) 的修改版。

用法

使用<pre lang="shell" prompt="$">和</pre> 將終端塊包裹起來。

範例 1:預設提示

<pre lang="shell" prompt="$">
ls -a
</pre>

範例 2:自訂提示

<pre lang="shell" prompt="#">
ls -a
</pre>

範例 3:另一個自訂提示

<pre lang="shell" prompt="user@machine$">
ls -a
</pre>

範例 4:註解

<pre lang="shell" prompt="user@machine$">
ls -a
# 還會列出隱藏檔案
</pre>

範例 5:多行命令

<pre lang="shell">
ls
<br>ls -a
</pre>

範例 6:多行命令和多個命令

<pre lang="shell">
ls
file1 file2 file3
<br>ls -A
.file0 file1 file2 file3
</pre>

外掛標籤

開發者團隊

⬇ 下載最新版 (v0.6.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「WP-ShkShell」→ 直接安裝(推薦)

原文外掛簡介

WP-ShkShell provides a terminal-like box for embedding terminal commands within pages or posts.
It also support multi-lines, multi-commands and has syntax hightlight.
The code is a modification of WP-Terminal (https://wordpress.org/extend/plugins/wp-terminal/).
Usage
Wrap terminal blocks with

 and 

.
Example 1: Default prompt

  ls -a

Example 2: Customized prompt

  ls -a

Example 3: Another customized prompt

  ls -a

Example 4: Comments

  ls -a
  # will also list hidden files

Example 5: Multiline commands

  ls
  
ls -a

Example 6: Multiline lines, multiple commands

  ls
  file1 file2 file3
  
ls -A .file0 file1 file2 file3

延伸相關外掛

文章
Filter
Mastodon