重要事項:本文件不適用於您目前選取的格式電子郵件!
amp-reddit
說明
顯示 Reddit 留言或貼文嵌入內容。
必要指令碼
<script async custom-element="amp-reddit" src="https://cdn.ampproject.org/v0/amp-reddit-0.1.js"></script>
支援的版面配置
範例
使用 amp-reddit
元件來嵌入 Reddit 貼文或留言。
範例:嵌入 Reddit 貼文
<amp-reddit layout="responsive" width="300" height="400" data-embedtype="post" data-src="https://www.reddit.com/r/me_irl/comments/52rmir/me_irl/?ref=share&ref_source=embed" > </amp-reddit>
範例:嵌入 Reddit 留言
<amp-reddit layout="responsive" width="400" height="400" data-embedtype="comment" data-src="https://www.reddit.com/r/sports/comments/54loj1/50_cents_awful_1st_pitch_given_a_historical/d8306kw" data-uuid="b1246282-bd7b-4778-8c5b-5b08ac0e175e" data-embedcreated="2016-09-26T21:26:17.823Z" data-embedparent="true" data-embedlive="true" > </amp-reddit>
屬性
data-embedtype (必填) | 嵌入類型,post 或 comment 。 |
data-src (必填) | 貼文或留言的永久連結 URI。 |
data-uuid | 留言嵌入內容的 UUID。當 data-embedtype 為 comment 時支援。 |
data-embedcreated | 留言嵌入內容的日期時間字串。當 data-embedtype 為 comment 時支援。 |
data-embedparent | 留言嵌入內容的日期時間字串。當 data-embedtype 為 comment 時支援。 |
data-embedlive | 指出嵌入的留言在原始留言更新時是否應更新。當 data-embedtype 為 comment 時支援。 |
title | 為元件定義 title 屬性。預設值為 Reddit 。 |
通用屬性 | 此元素包含擴充至 AMP 元件的通用屬性。 |
驗證
請參閱 AMP 驗證器規格中的amp-reddit 規則。
需要更多協助嗎?
您已閱讀本文件十幾次,但它仍然沒有真正涵蓋您的所有問題嗎?也許其他人也有同感:請在 Stack Overflow 上與他們聯繫。
前往 Stack Overflow 發現錯誤或缺少功能嗎?AMP 專案大力鼓勵您的參與和貢獻!我們希望您能成為我們開放原始碼社群的長期參與者,同時我們也歡迎您針對您特別熱衷的問題做出一次性的貢獻。
前往 GitHub