Theme.pm 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 $twitter_account, $fb_app_id
  28. Set these if you want the relevant twitter: and fb: meta tags emitted.
  29. Left empty, HTML::SocialMeta is handed nothing to put in them.
  30. =back
  31. =cut
  32. our $default_title = 'tCMS';
  33. our $default_image = 'img/icon/favicon-48.png';
  34. our $display_name = 'tCMS';
  35. our $description = 'tCMS is a content management system written in perl.';
  36. our $default_tags = 'tcms';
  37. our $twitter_account = '';
  38. our $fb_app_id = '';
  39. 1;