h-enk / json-sitemap
WordPress 插件,用于在非生产环境中生成 JSON 网站地图,可与 UnCSS 作为 PostCSS 插件一起使用
该软件包的官方仓库似乎已不存在,因此该软件包已被冻结
Requires
- php: >=5.6
- composer/installers: ~1.0
Requires (Dev)
This package is auto-updated.
Last update: 2019-08-14 13:13:50 UTC
README
A WordPress plugin that generates a JSON sitemap on non-production environments - for use with UnCSS as a PostCSS plugin. Visit: http://yourdomain.com?json_sitemap
Sitemap
The JSON sitemap includes
- 单独的文章
- 页面
- 单个自定义帖子类型(CPT)
- 作者存档
- 术语存档
- CT 术语存档
- 每月存档
此外,还包括以下特殊页面
- 空搜索结果页面
- 无搜索结果的搜索结果页面
- 带有分页的搜索结果页面
- 404 页面
要求
You'll need to have WP_ENV
defined in your WordPress config.
WP_ENV
must be defined as the current environment
define('WP_ENV', 'development');
If you use Bedrock, WP_ENV
is already defined in the config.
安装
If you're using Composer to manage WordPress, add json-sitemap to your project's dependencies
composer require h-enk/json-sitemap
Or manually add it to your composer.json
"require": { "php": ">=5.6", "johnpbloch/wordpress": "4.9.4", "h-enk/json-sitemap": "^1.0" }
使用方法
访问:http://yourdomain.com?json_sitemap
致谢
Inspired by JSON Sitemap Generator for Grunt-UnCSS with WordPress.