template.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. <?php
  2. return [
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Template Cache Settings
  6. |--------------------------------------------------------------------------
  7. */
  8. 'cache_enabled' => env('TEMPLATE_CACHE_ENABLED', true),
  9. 'cache_ttl' => env('TEMPLATE_CACHE_TTL', 3600),
  10. /*
  11. |--------------------------------------------------------------------------
  12. | Default Templates
  13. |--------------------------------------------------------------------------
  14. */
  15. 'default_templates' => [
  16. 'note' => [
  17. 'defaultParams' => ['text', 'type'],
  18. 'paramMapping' => [
  19. '0' => 'text',
  20. '1' => 'type'
  21. ],
  22. 'defaultValues' => [
  23. 'type' => 'info'
  24. ],
  25. 'validation' => [
  26. 'required' => ['text'],
  27. 'optional' => ['type', 'title']
  28. ]
  29. ],
  30. // 更多模板定义...
  31. ],
  32. /*
  33. |--------------------------------------------------------------------------
  34. | Renderer Settings
  35. |--------------------------------------------------------------------------
  36. */
  37. 'supported_formats' => ['json', 'html', 'markdown', 'text'],
  38. /*
  39. |--------------------------------------------------------------------------
  40. | Parser Settings
  41. |--------------------------------------------------------------------------
  42. */
  43. 'max_nesting_level' => 10,
  44. 'max_template_size' => 10000, // characters
  45. ];