[WordPress] 外掛分享: Shortnotes

首頁外掛目錄 › Shortnotes
10+
安裝啟用
★★★★★
5/5 分(1 則評價)
258 天前
最後更新
問題解決
WordPress 6.3+ PHP 7.2+ v1.7.0 上架:2021-03-10

內容簡介

Shortnotes 外掛新增一個自訂文章類型「筆記(Notes)」,用於發布類似於 Twitter、Instagram 等社交網路上的簡短內容。

無標題

筆記文章類型不支援傳統的標題。

筆記標題通常不需要在主題版面中顯示。使用者可能需要調整主題的外觀和感覺。詳細說明請見下方的「主題自訂」部分。

筆記標題會根據內容自動生成,並用作筆記的文件標題。這可供搜尋引擎閱讀並在瀏覽器標籤中顯示。

限制區塊

筆記文章類型僅使用基本內容區塊,如段落、圖片、相片庫、影片和嵌入。使用一組定義明確的相對簡單的區塊可使筆記保持簡潔。

Webmention 支援

筆記文章類型包含對Webmention和Semantic-Linkbacks外掛的支援。

筆記內容中的 URL 可能會被處理為可傳送Webmention。

區塊編輯器中的面板可用於添加回覆 URL 和名稱。提交後,它們將用於提供語義化的Webmention 回覆標記。

回覆標記模板

回覆規範最佳時機是將在主要內容元素之外定義u-in-reply-to元素。

Shortnotes 外掛提供一個樣板標記,可用於在您的主題中輸出回覆標記標記。

<article class="h-entry">
<?php
if ( function_exists( 'ShortNotes\PostType\Note\reply_to_markup' ) ) {
\ShortNotes\PostType\Note\reply_to_markup();
}
?>
<div class="entry-content e-content">
<?php the_content(); ?>
</div><!-- .entry-content -->
</article>

如果未使用此樣板標記,則 Shortnotes 外掛將自動將回覆標記標記附加到the_content中。

主題自訂

使用此外掛不需要自訂您的主題,但您可能需要思考如何顯示標題及是否需要完整的 Webmention 支援。

如果您想要自訂主題,我開發此外掛時在 Twenty Twenty One 的子主題上進行了調整,可作為範例參考。

這些調整包括:(a)刪除筆記文章類型的標題顯示,和(b)將回應標記標記放在主要內容元素之外。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.7.0) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Shortnotes」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

Shortnotes adds a custom post type, Notes, used to publish short pieces of content on your website, similar to social networks like Mastodon, Twitter, or Instagram.
No titles
The Notes post type does not support traditional titles.
Note titles are not generally meant to be displayed as part of the theme layout. You will likely need to adjust the look and feel of your theme accordingly. See the Theme Customization section below for more details.
A title is generated automatically from note content and is used as the note’s document title. This is readable by search engines and displayed in browser tabs.
Limited blocks
The Notes post type supports basic content blocks like paragraph, list, quote, image, preformatted text, gallery, video, and embed. Using a defined list of relatively simple blocks helps to keep notes simple.
Webmention support
The Notes post type includes support for the Webmention and Semantic-Linkbacks plugins.
URLs in note content are processed as possible webmentions.
A panel in the block editor allows for the addition of a reply to URL and name. When entered, they are used to provide markup for a semantic webmention reply.
Reply to template tag
The reply specification works best when the u-in-reply-to element is outside of the main content element, defined by e-content.
A template tag is provided as part of the Shortnotes plugin that can be used to output reply to markup in your theme.


If this template tag is not used, then the Shortnotes plugin will automatically prepend the reply to markup to the_content.
Theme Customization
No customization of your theme is required to use this plugin, though you will likely want to think through how titles are displayed and if you want full support for webmentions.
If you do find yourself wanting to customize, I have made my site’s theme fully compatible while developing this plugin. It may be a helpful example.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon