spontaneit/static-content-bundle
最新稳定版本:v0.8
Composer 安装命令:
composer require spontaneit/static-content-bundle
包简介
Generate static pages
README 文档
README
Generate static pages from symfony routes
Configuration
Add static_content.yaml file in your config/packages folder
static_content:
target_folder: static
included_routes: []
excluded_routes: ['app_logout', 'app_login']
excluded_prefix_routes: ['ajax', 'admin']
use included_routes for only generate static content for theses routes or use excluded_routes and/or excluded_prefix_routes for generate static content for all route but not in excluded
Edit htaccess
Add this to the /public/.htaccess file to serve static pages automatically:
RewriteCond %{DOCUMENT_ROOT}/static/%{REQUEST_URI}.html -f [NC]
RewriteRule ^ static/%{REQUEST_URI}.html [L]
where static is the default 'target_folder' parameter in config file
Doctrine entities
to generate static pages for doctrine entities with for example a slug attribute, you have to set parameter name like this: {myentity_slug}
统计信息
- 总下载量: 53
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-04-28