PerlDancer / perldancer-website

Source code of the website of Dancer (written with Dancer)
47 stars 29 forks source link

Pages on http://perldancer.org/ should have meaningful <title> contents. #36

Open shlomif opened 9 years ago

shlomif commented 9 years ago

Hi all,

the pages on http://perldancer.org/ currently all share the same element, but it should be different for each page and meaningful.</p> <p>Regards,</p> <p>-- Shlomi Fish</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/szabgab"><img src="https://avatars.githubusercontent.com/u/48833?v=4" />szabgab</a> commented <strong> 9 years ago</strong> </div> <div class="markdown-body"> <p>Most of the pages are autogenerated from their templates. I am not sure how to set their titles.</p> </div> </div> <div class="comment"> <div class="user"> <a rel="noreferrer nofollow" target="_blank" href="https://github.com/shlomif"><img src="https://avatars.githubusercontent.com/u/3150?v=4" />shlomif</a> commented <strong> 9 years ago</strong> </div> <div class="markdown-body"> <p>ack gave me:</p> <pre><code>views/layouts/main.tt 5: <title><% if title %><% title %><% else %>Dancer - Perl Web Framework for easy and fun webapp development<% end %></title></code></pre> <p>So I think the place to add it is lib/PerlDancer.pm under:</p> <pre><code class="language-perl"># Add last tweet to template params hook before_template_render => sub { my $t = shift; $t->{last_tweet} = latest_tweet(); $t->{this_year} = 1900 + (localtime)[5]; }; </code></pre> <p>Maybe there's a better way.</p> </div> </div> <div class="page-bar-simple"> </div> <div class="footer"> <ul class="body"> <li>© <script> document.write(new Date().getFullYear()) </script> Githubissues.</li> <li>Githubissues is a development platform for aggregating issues.</li> </ul> </div> <script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"></script> <script src="/githubissues/assets/js.js"></script> <script src="/githubissues/assets/markdown.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/highlight.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.4.0/build/languages/go.min.js"></script> <script> hljs.highlightAll(); </script> </body> </html>