George S. Baugh 5 年之前
父节点
当前提交
dbc327a308
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      lib/Trog/Routes/HTML.pm

+ 6 - 1
lib/Trog/Routes/HTML.pm

@@ -729,7 +729,7 @@ sub posts ($query, $render_cb) {
     my $styles = _build_themed_styles('posts.css');
 
     #Correct page headers
-    my $ph = $themed ? Theme::path_to_tile($query->{route}) : $query->{route};
+    my $ph = $themed ? _themed_title($query->{route}) : $query->{route};
     $ph = $query->{title} if $query->{title};
 
     # Build page title if it wasn't set by a wrapping sub
@@ -763,6 +763,11 @@ sub posts ($query, $render_cb) {
     return Trog::Routes::HTML::index($query, $render_cb, $content, $styles);
 }
 
+sub _themed_title ($path) {
+    return $path unless %Theme::paths;
+    return $Theme::paths{$path} ? $Theme::paths{$path} : $path;
+}
+
 sub _post_helper ($query, $tags, $acls) {
     state $data = Trog::Data->new($conf);
     return $data->get(