head.ejs 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <%
  2. var keywords = '';
  3. var description = '';
  4. (function() {
  5. if (theme.keywords) {
  6. keywords += theme.keywords;
  7. keywords += ',';
  8. }
  9. if (page.keywords) {
  10. keywords += page.keywords;
  11. }
  12. if (config.description) {
  13. description += config.description;
  14. description += ',';
  15. }
  16. if (is_post()) {
  17. description += truncate(strip_html(page.content), {length: 100, omission: ','});
  18. }
  19. })();
  20. %>
  21. <!DOCTYPE html>
  22. <html lang="<%= config.language %>" class="loading">
  23. <head>
  24. <meta charset="UTF-8" />
  25. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  26. <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
  27. <title><%= config.title %><% if (config.subtitle){ %> - <%- config.subtitle %><%}%></title>
  28. <meta name="apple-mobile-web-app-capable" content="yes" />
  29. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  30. <meta name="google" content="notranslate" />
  31. <% if (keywords) { %><meta name="keywords" content="<%= keywords %>"> <% } %>
  32. <% if (description) { %><meta name="description" content="<%= description %>"> <% } %>
  33. <% if (config.author){ %><meta name="author" content="<%= config.author %>"> <% } %>
  34. <% if (theme.rss){ %><link rel="alternative" href="<%- theme.rss %>" title="<%= config.title %>" type="application/atom+xml"> <% } %>
  35. <% if (theme.favicon){ %><link rel="icon" href="<%- url_for(theme.favicon) %>"> <% } %>
  36. <%- css(['//cdn.jsdelivr.net/npm/gitalk@1/dist/gitalk.css'])%>
  37. <%- css(['css/diaspora.css'])%>
  38. </head>