前言介紹
- 這款 WordPress 外掛「Blog Terminal」是 2017-10-16 上架。
- 目前有 100 個安裝啟用數。
- 上一次更新是 2021-08-11,距離現在已有 1361 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 2.5 以上版本才可以安裝。
- 外掛要求網站主機運作至少需要 PHP 版本 5.4 以上。
- 尚未有人給過這款外掛評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
rsprta |
外掛標籤
cmd | unix | xterm | console | terminal |
內容簡介
Blog Terminal 創建了一個終端風格的框,您可以使用它來演示終端輸出或展示輸入終端/控制台命令的過程,以更形象地展示實際使用 Linux/Unix 終端或 Windows cmd shell 的方式。
這個插件的程式碼是 Post Terminal 的分支,而 Post Terminal 則是 WP-Terminal 的分支,而 WP-Terminal 則是 WP-Syntax 的修改版,這是 WordPress 的一個原始碼突顯插件。
與 Post Terminal 不同的是,它使用 [terminal] 簡寫來表示終端框,它只在顯示顯式设置要顯示提示的行時顯示提示。
基本用法
最基本的用法是將您的終端區塊包裹在 [terminal] 和 [/terminal] 標籤中。如果標籤中沒有進一步定義選項,將生成一個通用提示符,使用'user@computer',不顯示工作目錄。這與在sh(1)中導出PS1="(\u)@\h: ",在csh(1)中設置prompt="%n@%m: "等是類似的。
標籤中的其他選項包括 user="user",computer="computer" 和 cwd="/path/to/directory"。這些選項允許您覆蓋通用的 user@computer 設置,以及提供“當前工作目錄”。
提示僅顯示以'$ '開頭的行。因此,您可以將命令和模擬的終端輸出混合使用。
用法
用 [terminal user="username" computer="computername" cwd="/path/to/directory"] 和 [terminal] 包裹終端塊。它們都是可選的。如果您沒有提供其值,將顯示“user”和“computer”,而 cwd 則純粹是選擇性的。
範例 1:未定制的命令
[terminal]
$ ls -a
[/terminal]
範例 2:使用者和電腦的自定義設置
[terminal user="tux" computer="linux"]
$ ls -a
[/terminal]
範例 3:僅定制使用者
[terminal user="dak"]
$ ls -a
[/terminal]
範例 4:定制使用者、電腦並顯示工作目錄
[terminal user="root" computer="linuxserver" cwd="/usr/src/linux"]
$ make mrproper
...
...
[/terminal]
原文外掛簡介
Blog Terminal generates a terminal-like box that you can use to demonstrate terminal output or show the entry of terminal/console commands in a manner that is more demonstrative of actually using a Linux/Unix terminal or Windows cmd shell.
The code is a fork of Post Terminal, which is a fork of WP-Terminal which in turn is a modification of WP-Syntax, a source code highlighter plugin for WordPress.
Unlike Post terminal, it uses [terminal] shorthand for the terminal box. It also shows prompt only on lines explitly set to do that.
Basic Usage
The most basic usage is to wrap your terminal blocks with [terminal][/terminal] tags. If no further options are defined within the tag a generic prompt is generated using ‘user@computer’ with no working directory shown. This is similar to exporting PS1=”\u@\h:$ ” in sh(1), setting prompt=”%n@%m:$ ” in csh(1), etc.
Other options available within the tag are user=”user”, computer=”computer”, and cwd=”/path/to/directory”. These allow you to override the generic user@computer settings as well as provide a ‘current working directory’.
The prompt is only shown on the lines starting with ‘$ ‘. So you can mix commands with simulated terminal output.
Usage
Wrap terminal blocks with [terminal user="username" computer="computername" cwd="/path/to/directory"] and [\terminal]. They are all optional. “user” and “computer” will be shown if you don’t provide them, cwd is purely optional.
Example 1: No customized command
[terminal]
$ ls -a
[/terminal]
Example 2: User and computer customizations
[terminal user="tux" computer="linux"]
$ ls -a
[/terminal]
Example 3: Customizing just the user
[terminal user="dak"]
$ ls -a
[/terminal]
Example 4: Customizing user, computer and displaying a working directory
[terminal user="root" computer="linuxserver" cwd="/usr/src/linux"]
$ make mrproper
...
...
[/terminal]
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Blog Terminal」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
0.1 | 0.2 | 0.1.1 | 0.1.2 | 0.2.1 | trunk |
延伸相關外掛(你可能也想知道)
WPTerm 》終端機, WPTerm 是一個類似 xterm 的外掛程式。它可用於從 WordPress 管理儀表板執行非交互式 shell 命令。, , 就像終端機一樣,WPTerm 讓您可以做幾乎任何您...。