{"id":21160007,"url":"https://github.com/holmesian/typecho-amp","last_synced_at":"2025-07-09T14:30:47.116Z","repository":{"id":40951719,"uuid":"112754437","full_name":"holmesian/Typecho-AMP","owner":"holmesian","description":"A typecho plugin for Google AMP / Baidu MIP.","archived":false,"fork":false,"pushed_at":"2020-12-25T14:58:22.000Z","size":1327,"stargazers_count":181,"open_issues_count":4,"forks_count":31,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-05T01:22:51.791Z","etag":null,"topics":["amp","mip","typecho","typecho-plugin"],"latest_commit_sha":null,"homepage":"https://holmesian.org/ampindex/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/holmesian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-12-01T15:20:29.000Z","updated_at":"2024-11-22T06:33:24.000Z","dependencies_parsed_at":"2022-09-20T18:04:14.032Z","dependency_job_id":null,"html_url":"https://github.com/holmesian/Typecho-AMP","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/holmesian/Typecho-AMP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holmesian%2FTypecho-AMP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holmesian%2FTypecho-AMP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holmesian%2FTypecho-AMP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holmesian%2FTypecho-AMP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/holmesian","download_url":"https://codeload.github.com/holmesian/Typecho-AMP/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/holmesian%2FTypecho-AMP/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264476011,"owners_count":23614426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["amp","mip","typecho","typecho-plugin"],"created_at":"2024-11-20T13:01:57.219Z","updated_at":"2025-07-09T14:30:47.110Z","avatar_url":"https://github.com/holmesian.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AMP for Typecho\r\n\r\nA Typecho plugin for Google AMP / Baidu MIP\r\n\r\n## 总览\r\n\r\n这是款一键生成符合 Google AMP/Baidu MIP 标准页面的插件，开启后可以进一步优化谷歌和百度的搜索结果。\r\n\r\n最初本插件的功能是[直接通过暴力修改模板][1]实现的，结果发现有不少 TX 需要这个功能，所以就整理了一下做成插件，方便有需要的 TX 使用，随着不断的改进变成了现在的样子。\r\n\r\n如果在使用过程中遇到问题，还请反馈。\r\n\r\n点击下载[最新版][2]\r\n\r\n2020.09.23 修改缓存表名，修改hash字段属性，修正AMPpage中的变量名称。\r\n\r\n2020.08.21 修复私密和隐藏文章跳过的问题。\r\n\r\n2020.08.01 修复新发表文章不能自动提交的问题，删除部分不在使用的变量。  \u003c- 已安装旧版本的 **请先禁用插件！** 在更新文件后再启用\r\n\r\n2020.06.30 增加版本检查，修改sitemap分页数量。\r\n\r\n2020.06.07 去除已下线的熊掌号相关功能，将自动提交和批量提交功能修改为 提交到快速收录接口和普通收录接口。 版本更新为0.7.6。\r\n\r\n\r\n------\r\n\r\n## 使用\r\n\r\n### 安装\r\n\r\n建议环境 PHP 5.6+\r\n\r\n将文件夹重命名为 `AMP`，拷贝至 `usr/plugins/` 下，然后在后台-\u003e插件处安装。\r\n\r\n### 升级\r\n\r\n\u003e 注意：已安装旧版本的 **请先禁用插件！** 在更新文件后再启用。\r\n\r\n\r\n\u003e 非 MarkDown 编辑器书写的文章由于存在诸多不可预见的情况，生成的 AMP/MIP 页面可能不能完全符合标准，如果有遇到请及时反馈。\r\n\r\n------\r\n\r\n## 使用说明\r\n\r\n- 在插件后台设置默认 LOGO 以及选择是否开启 SiteMap、AMP 首页、~~自动提交到熊掌号等功能（除自动提交到熊掌号外的功能都默认开启）~~。\r\n\r\n- 从[百度站长][3]获取接口调用地址、~~熊掌号 APPID/TOKEN~~，填写到插件设置中（使用提交 URL功能时需要）。\r\n\r\n- AMP/MIP 的页面缓存默认关闭，可在插件设置页面修改缓存时间。修改文章会自动更新页面缓存，重建缓存开关在插件设置页，设置缓存时间的下方。\r\n\r\n- AMP/MIP 页面的模板已独立至 templates目录中，有个性化需要的 TX 可以自己进一步调整。\r\n\r\n注意：\r\n\r\n- 服务器 PHP 环境未启用 cURL 扩展时，后台批量提交至百度的功能不可用。\r\n- **非 HTTPS 站点**受 [AMP-LIST 控件][4] 的 src 参数限制，AMP 首页无法换页，建议关闭生成 AMP 首页功能。\r\n\r\n------\r\n\r\n启用重写功能后：\r\n\r\nAMP 首页为： http(s)://xxx/ampindex/\r\n\r\nAMP 页面为： http(s)://xxx/amp/slug/\r\n\r\nMIP 页面为： http(s)://xxx/mip/slug/\r\n\r\n\r\n------\r\n\r\n## 功能\r\n\r\n- 生成符合 Google AMP/Baidu MIP 标准的 AMP/MIP 页面，并与标准页面建立关联。\r\n\r\n- 生成 AMP/MIP 的 SiteMap，及所有 URL 的纯文本列表（支持分页）。\r\n\r\n- 生成 AMP 版的首页。\r\n \r\n- 后台批量提交 URL 到百度站长平台，可选手动或自动。\r\n\r\n- MIP 页面完美支持百度熊掌号页面标准，~~新发表文章自动提交到熊掌号~~。\r\n\r\n- （新增）用户决定是否只允许百度和谷歌的爬虫访问 MIP/AMP 页面。\r\n\r\n- （新增）插件版本判断。\r\n\r\n- （新增）自定义 MIP/AMP 页面样式。\r\n\r\n- （新增）缓存功能，缓存访问过的 MIP/AMP 页面，可显著提高性能（默认关闭）。\r\n\r\n- 自动解析自定义文章路径。\r\n\r\n\r\n------\r\n\r\n## 支持\r\n\r\n如果本插件帮到了你，不妨给点赞赏鼓励一下作者 ^-^\r\n\r\n\u003cimg width=\"150\" height=\"150\" src=\"https://raw.githubusercontent.com/holmesian/Typecho-AMP/dev/alipay.jpg\"\u003e\r\n\u003cimg width=\"150\" height=\"150\" src=\"https://raw.githubusercontent.com/holmesian/Typecho-AMP/dev/wechat.jpg\"\u003e\r\n\r\n------\r\n## 效果预览\r\n\r\nMIP内容页：\r\n\r\n![MIP内容页](https://raw.githubusercontent.com/holmesian/Typecho-AMP/dev/screencapture-holmesian-org-mip-AMP-for-Typecho-2018-03-27-10_10_37.png)\r\n\r\n\r\nAMP内容页：\r\n\r\n![AMP内容页](https://raw.githubusercontent.com/holmesian/Typecho-AMP/dev/screencapture-holmesian-org-amp-AMP-for-Typecho-2018-03-27-10_11_27.png)\r\n\r\n\r\nAMP首页：\r\n\r\n![AMP首页](https://raw.githubusercontent.com/holmesian/Typecho-AMP/dev/screencapture-holmesian-org-ampindex-2018-03-27-10_12_54.png)\r\n\r\n\r\n  [1]: https://holmesian.org/typecho-upgrade-AMP\r\n  [2]: https://github.com/typecho-fans/plugins/releases/download/plugins-A_to_C/AMP.zip\r\n  [3]: https://ziyuan.baidu.com/dailysubmit/index\r\n  [4]: https://www.ampproject.org/docs/reference/components/amp-list\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholmesian%2Ftypecho-amp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fholmesian%2Ftypecho-amp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fholmesian%2Ftypecho-amp/lists"}