Theme.pm 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. package Theme;
  2. use 5.040;
  3. use re '/aasx';
  4. use warnings FATAL => 'all';
  5. =head1 Theme
  6. An example of the bare minimum your themes' routes.pm need.
  7. Copy and alter things below as needed.
  8. Themes are loaded by Trog::Themes::routes(), which requires the active theme's
  9. routes.pm and expects it to have populated the package variables below, along
  10. with %Theme::routes if the theme wants routes of its own.
  11. Everything here is optional -- Trog::Routes::HTML falls back to generic tCMS
  12. defaults for anything a theme leaves unset -- but a site that sets none of it
  13. will identify itself as "Another tCMS Site" to search engines and social media.
  14. =head2 VARIABLES
  15. =over 4
  16. =item $default_title
  17. Fallback <title> for pages which have no post of their own to name them.
  18. =item $default_image
  19. The image handed to social media scrapers as the site's preview, as a path
  20. relative to www/. The theme's copy wins when it has one.
  21. =item $display_name
  22. What the site calls itself, e.g. in the og:site_name meta tag.
  23. =item $description
  24. Fallback meta description, used when the page has no post body to summarize.
  25. =item $default_tags
  26. Comma separated keywords for the meta keywords tag.
  27. =item @scripts
  28. The names of scripts that every page links, before the scripts of the page
  29. itself. Each is a file in the theme's scripts/ directory or in www/scripts,
  30. as the scripts of a route are.
  31. =item $twitter_account, $fb_app_id
  32. Set these if you want the relevant twitter: and fb: meta tags emitted.
  33. Left empty, HTML::SocialMeta is handed nothing to put in them.
  34. =back
  35. =cut
  36. our $default_title = 'tCMS';
  37. our $default_image = 'img/icon/favicon-48.png';
  38. our $display_name = 'tCMS';
  39. our $description = 'tCMS is a content management system written in perl.';
  40. our $default_tags = 'tcms';
  41. our @scripts = ();
  42. our $twitter_account = '';
  43. our $fb_app_id = '';
  44. 1;