內容目錄
前言介紹
- 這款 WordPress 外掛「Sectionize」是 2009-11-03 上架。
- 目前有 10 個安裝啟用數。
- 上一次更新是 2009-12-18,距離現在已有 5616 天。超過一年沒更新,安裝要確認版本是否可用。以及後續維護問題!
- 外掛最低要求 WordPress 2.8 以上版本才可以安裝。
- 尚未有人給過這款外掛評分。
- 還沒有人在論壇上發問,可能目前使用數不多,還沒有什麼大問題。
外掛協作開發者
外掛標籤
seo | toc | HTML5 | sections | table of contents |
內容簡介
此外掛是由Shepherd Interactive開發,造福社群使用,並不提供支援。若有任何問題,請在支援論壇上發問。
可以處理包含平行段落標題元素的HTML內容,
並會自動將它們嵌套在HTML5
它還會有條件地在內容中加入一個帶有鏈接到每個
章節的目錄。例如:
章節依照原始文章內容的格式會被分割為:
First Top
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Second Top
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
First Sub
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Second Sub
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Third Top
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
在頁面上添加目錄不僅有助於網站訪客瀏覽,還可以直接
在Google搜尋結果中顯示與目錄鏈接相關的章節(詳情參見此公告)。
因此,網站訪客可以在搜尋結果頁面上直接看到章節鏈接,
並且可以直接跳轉到相關的章節。
開始/結束標籤以及用於生成章節ID的前綴可以通過以下WordPress選項進行配置(附有其默認值):
sectionize_id_prefix:'section-'
sectionize_start_section:'
sectionize_end_section:'
sectionize_start_toc:''
sectionize_post_types:'post,page'
原文外掛簡介
This plugin is developed at
Shepherd Interactive
for the benefit of the community. No support is available. Please post any questions to the support forum.
Takes HTML content which contains flat heading elements inline with paragraphs
and automatically nests them withing HTML5
conditionally prepends an
- Table of Contents (TOC) with links to the
sections in the content, for example:
This would reflect original post content such as:
First Top
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Second Top
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
First Sub
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Second Sub
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Third Top
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Original post content such as this would be sectionized as follows:
First Top
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Second Top
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
First Sub
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Second Sub
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Third Top
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Adding a table of contents as such not only aids navigation for visitors once
on the page, but Google also now provides direct links to such sections in relevant search result
snippets (see announcement).
So people browsing search results may be able to see your section links
right from the results page and then be able to jump directly to the relevant
section.
The start/end tags for both the sections and the TOC, as well as the prefixes
used when generating the section IDs, may all be configured via the following
WordPress options (with their defaults):
sectionize_id_prefix: 'section-'
sectionize_start_section: '
sectionize_end_section:
sectionize_include_toc_threshold: 2
sectionize_before_toc: '
'
sectionize_disabled: false (no corresponding function argument)
These global WordPress options may be overridden by individual posts/pages by
creating custom fields (postmeta) with the same names.
These options are retreived if their corresponding arguments are not supplied
to the sectionize() function (that is, if they are null):
function sectionize($original_content,
$id_prefix = null,
$start_section = null,
$end_section = null,
$include_toc_threshold = null,
$before_toc = null,
$after_toc = null)
This sectionize() function is added as a filter for the_content (this is
disabled if the option or postmeta sectionize_disabled evaluates to true):
add_filter('the_content', 'sectionize');
Noted above, the TOC is conditionally included. It is not included if:
there are no headings in the content (thus there is nothing to sectionize),
the headings are not nested properly (see below), or
the heading count does not meet the threshold (or the threshold is -1)
If the number of headings in the content is less than the
include_toc_threshold option/argument then the TOC is not displayed;
likewise, if include_toc_threshold is -1 then the TOC is not displayed.
Important! Regarding headings being “nested properly”, you must ensure that
you properly arrange your headings in a hierarchical manner in which no heading
is immediately preceeded by another heading that is more than one level greater
(e.g. an h3 must be preceeded by an h2 or another h3). For example, this
works:
h2
h3
h3
h4
h3
h2
But this does not:
h2
h4 -- fail
h6 -- fail
h2
If you make such a mistake, this plugin will abort and have no effect. An error
notice will be included in the HTML output in the form of an HTML comment.
Please see source code for additional documentation: numerous filters are provided
to further customize the behavior. Be one with the code!
To help serve HTML5 content, see the XHTML5 Support plugin.
各版本下載點
- 方法一:點下方版本號的連結下載 ZIP 檔案後,登入網站後台左側選單「外掛」的「安裝外掛」,然後選擇上方的「上傳外掛」,把下載回去的 ZIP 外掛打包檔案上傳上去安裝與啟用。
- 方法二:透過「安裝外掛」的畫面右方搜尋功能,搜尋外掛名稱「Sectionize」來進行安裝。
(建議使用方法二,確保安裝的版本符合當前運作的 WordPress 環境。
延伸相關外掛(你可能也想知道)
Easy Video Player 》Easy Video Player 是一個易於使用的 WordPress 影片外掛程式,可展示您的影片。您可以嵌入自行架設的影片或使用直接連結外部架設的影片。, Easy Video Playe...。
MediaElement.js – HTML5 Video & Audio Player 》此外掛為 WordPress 設計的影音控制元件,是建立在 MediaElement.js HTML5 播放器程式庫之上,並為不支援 HTML5 的瀏覽器提供 Flash 或 Silverlight 候補播放...。
Videojs HTML5 Player 》Video.js HTML5 Player 是一個支持桌面和移動裝置視頻播放的用戶友好的外掛。它讓你輕鬆嵌入自主託管的視頻文件或使用 Video.js 庫的外掛視頻文件。, , Video...。
Video.js – HTML5 Video Player for WordPress 》, , 這是一個基於 Video.js HTML5 播放器庫所建立的 WordPress 外掛。它能夠讓您使用 HTML5 在文章或頁面中嵌入影片,並提供 Flash 回退支援非 HTML5 瀏覽器...。
WordPress Mobile Pack – Mobile Plugin for Progressive Web Apps & Hybrid Mobile Apps 》WordPress Mobile Pack 是一款能協助你將網站內容轉換為漸進式行動網路應用程式的 WordPress 外掛。它附帶多種行動應用主題,可單獨購買或作為一個套件購買。...。
Gravity Forms – Placeholders add-on 》將 Gravity Forms 外掛的 HTML5 placeholder 功能強化,將欄位標籤複製為 placeholder 並隱藏之。對於不支援 HTML5 placeholder 屬性的舊版瀏覽器,使用 Java...。
Video Player for WPBakery 》Video Player for WPBakery 是 WPBakery Page Builder 的一個外掛程式,可以讓您在 WordPress 網站中添加 YouTube、Vimeo 和自行托管的視頻(HTML5)。, 功能...。
mb.YTPlayer for background videos 》這是一個無框架的YouTube®視訊播放器,可讓您將任何YouTube®視訊作為Wordpress®網頁或文章的背景播放。, 您可以從設置面板啟用首頁播放(不需要許可證),或...。
Cincopa video and media plug-in 》無需多個 WordPress 外掛來管理您的媒體,Cincopa 是您所有媒體需求中唯一需要的外掛。使用 Cincopa 輕鬆地添加視頻、照片庫、幻燈片、音樂和播放列表等等。...。
PB oEmbed HTML5 Audio – with Cache Support 》這個外掛使用 WordPress 用於其他用途(例如YouTube視頻等)的 oEmbed 技術,為文章和頁面添加了放置音頻文件的功能。音頻文件使用 HTML5 音頻標籤嵌入,對於...。
Modernizr for WordPress 》這個外掛可以在你的WordPress安裝中加入 Modernizr。, Modernizr是一個小型JavaScript函式庫,用來檢測下一代網頁技術中的原生實作可用性,也就是來自HTML5和...。
Gravity Forms HTML5 Validation 》此外掛為Gravity Forms外掛新增原生HTML5驗證支援。, 支援標準與分頁表單。, 支援標準欄位, , 單行文字, 段落文字, 下拉式清單, 多選清單, 核取方塊, 數字, ...。
Flowplayer Video Player 》Flowplayer 影片播放器可在您的 WordPress 網站上添加一個影片短碼。使用此短碼,您可以嵌入一個影片檔案,並使用 Flowplayer HTML5 播放器進行播放。, 特點,...。
Bradmax Player 》Bradmax Player 是一個 WordPress 外掛,支援桌面及行動裝置上的影片串流播放。只要您具有以下格式的影片串流存取權限:, – HLS, – MPEG-DASH, &...。
Radio Forge Muses Player with Skins 》RadioForge Players 可在瀏覽器中提供本機音頻播放。它支援所有的瀏覽器,包括 iOS、Android、Firefox、Chrome、Safari、IE 和 Opera。, RadioForge Players ...。