Theme.pm 1.6 KB

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