定制 spontaneit/static-content-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-04-28