內容簡介
一個簡單卻強大的外掛程式,可以根據目前的模板自動生成 AMP 頁面。
特點
非常簡單,不需要任何配置。
適用於所有使用 WordPress 模板的頁面。
進階使用與篩選器
如果您需要條件檢查,請使用 Simple_AMP_Helper::is_amp_endpoint()。
默認終端點為 amp,但您可以通過 simple_amp_query_var 篩選器進行更改。
您可以使用 simple_amp_html_output 篩選器修改 HTML 輸出。
您可以使用 simple_amp_output 篩選器修改 AMP 輸出。
您可以使用 simple_amp_template 篩選器使用自定義模板文件。
使用 simple_amp_debug 篩選器進行驗證問題和修復。
PHP 要求:此外掛僅適用於 PHP 5.6 及以上版本
鳴謝
AMP 外掛程式提供了靈感
amp-library 用於將 HTML 轉換為 AMP
貢獻
歡迎在 Github 上提交拉取請求。
外掛標籤
開發者團隊
原文外掛簡介
A ridiculously simple yet powerful plugin that automatically generates AMP pages based on current template.
Features
It is extremely simple, no configuration needed.
Works for all pages which uses WordPress template.
Advanced Usage & Filters
If you need conditional check, use Simple_AMP_Helper::is_amp_endpoint()
Default endpoint is amp but you can change it via simple_amp_query_var filter
You can modify HTML output by using simple_amp_html_output filter
You can modify AMP output by using simple_amp_output filter
You can use custom template file by using simple_amp_template filter
Use simple_amp_debug filter for validation issues and fixes
PHP requirement: This plugin only works with PHP 5.6 and above
Credits
AMP plugin for inspiration
amp-library for converting HTML to AMP
Contributing
Pull requests are welcome on Github
