article.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. {% extends "base.html" %}
  2. {% block title %}{{ article.title|striptags }} - {{ SITENAME }}{% endblock %}
  3. {% block html_lang %}{{ article.lang }}{% endblock %}
  4. {% block meta %}
  5. {% if article.author %}
  6. <meta name="author" content="{{ article.author }}" />
  7. {% else %}
  8. <meta name="author" content="{{ AUTHOR }}" />
  9. {% endif %}
  10. {% if article.tags %}
  11. <meta name="keywords" content="{{ article.tags|join(',')|striptags }}" />
  12. {% endif %}
  13. {% if article.summary %}
  14. <meta name="description" content="{{ article.summary|striptags|escape }}" />
  15. {% endif %}
  16. {% endblock %}
  17. {% block opengraph %}
  18. {% if USE_OPEN_GRAPH %}
  19. {% if OPEN_GRAPH_FB_APP_ID %}
  20. <meta property="fb:app_id" content="{{ OPEN_GRAPH_FB_APP_ID }}"/>
  21. {% endif %}
  22. <meta property="og:site_name" content="{{ SITENAME }}" />
  23. <meta property="og:type" content="article"/>
  24. <meta property="og:title" content="{{ article.title|striptags|escape }}"/>
  25. <meta property="og:url" content="{{ SITEURL }}/{{ article.url }}"/>
  26. <meta property="og:description" content="{{ article.summary|striptags|escape }}"/>
  27. <meta property="article:published_time" content="{{ article.date.strftime("%Y-%m-%d") }}" />
  28. {% if article.category %}
  29. <meta property="article:section" content="{{ article.category }}" />
  30. {% endif %}
  31. {% for tag in article.tags %}
  32. <meta property="article:tag" content="{{ tag }}" />
  33. {% endfor %}
  34. {% if article.author %}
  35. <meta property="article:author" content="{{ article.author }}" />
  36. {% elif AUTHOR %}
  37. <meta property="article:author" content="{{ AUTHOR }}" />
  38. {% endif %}
  39. {% if article.og_image %}
  40. <meta property="og:image"
  41. content="{{ SITEURL }}/{{ article.og_image }}"/>
  42. {% elif OPEN_GRAPH_IMAGE %}
  43. <meta property="og:image"
  44. content="{{ SITEURL }}/{{ OPEN_GRAPH_IMAGE }}"/>
  45. {% endif %}
  46. {% endif %}
  47. {% endblock %}
  48. {% block canonical_rel %}
  49. <link rel="canonical" href="{{ SITEURL }}/{{ article.url }}">
  50. {% endblock %}
  51. {% block breadcrumbs %}
  52. {% if DISPLAY_BREADCRUMBS %}
  53. {% if DISPLAY_CATEGORY_IN_BREADCRUMBS %}
  54. <ol class="breadcrumb">
  55. <li><a href="{{ SITEURL }}" title="{{ SITENAME }}"><i class="fa fa-home fa-lg"></i></a></li>
  56. <li><a href="{{ SITEURL }}/{{ article.category.url }}" title="{{ article.category }}">{{ article.category }}</a></li>
  57. <li class="active">{{ article.title }}</li>
  58. </ol>
  59. {% else %}
  60. <ol class="breadcrumb">
  61. <li><a href="{{ SITEURL }}" title="{{ SITENAME }}"><i class="fa fa-home fa-lg"></i></a></li>
  62. <li class="active">{{ article.title }}</li>
  63. </ol>
  64. {% endif %}
  65. {% endif %}
  66. {% endblock %}
  67. {% block content %}
  68. <section id="content">
  69. <article>
  70. <header class="page-header">
  71. <h1>
  72. <a href="{{ SITEURL }}/{{ article.url }}"
  73. rel="bookmark"
  74. title="Permalink to {{ article.title|striptags }}">
  75. {{ article.title }}
  76. </a>
  77. </h1>
  78. </header>
  79. <div class="entry-content">
  80. <div class="panel">
  81. <div class="panel-body">
  82. {% include "includes/article_info.html" %}
  83. </div>
  84. </div>
  85. {{ article.content }}
  86. </div>
  87. <!-- /.entry-content -->
  88. {% include 'includes/related-posts.html' %}
  89. {% include 'includes/series.html' %}
  90. {% include 'includes/addthis.html' %}
  91. {% include 'includes/shariff.html' %}
  92. {% include 'includes/comments.html' %}
  93. </article>
  94. </section>
  95. {% endblock %}