|
| 1 | +<article class="post"> |
| 2 | + <h1>{{ page.title }}</h1> |
| 3 | + <div class="meta"> |
| 4 | + {% if page.categories %} |
| 5 | + <span class="categories"> |
| 6 | + <span class="icon-bookmark" title="Categories"></span> |
| 7 | + {% for category in page.categories %} |
| 8 | + <a href="/categories.html#{{ category }}" title="{{ category }}">{{ category }}</a> |
| 9 | + {% endfor %} |
| 10 | + </span> |
| 11 | + {% endif %} |
| 12 | + |
| 13 | + {% if page.tags %} |
| 14 | + <span class="tags"> |
| 15 | + <span class="icon-tags" title="Tags"></span> |
| 16 | + {% for tag in page.tags %} |
| 17 | + <a href="/tags.html#{{ tag }}" title="{{ tag }}">#{{ tag }}</a> |
| 18 | + {% endfor %} |
| 19 | + </span> |
| 20 | + {% endif %} |
| 21 | + </div> |
| 22 | + <div class="entry"> |
| 23 | + {{ content }} |
| 24 | + </div> |
| 25 | + |
| 26 | + {% if page.previous or page.next %} |
| 27 | + <div id="page_nav"> |
| 28 | + <div class="split"> |
| 29 | + <i>上一篇 / 下一篇</i> |
| 30 | + <hr/> |
| 31 | + </div> |
| 32 | + <div> |
| 33 | + {% if page.next %} |
| 34 | + <li><a href='{{page.next.url}}'>{{page.next.title}}</a></li> |
| 35 | + {% endif %} |
| 36 | + </div> |
| 37 | + <div> |
| 38 | + {% if page.previous %} |
| 39 | + <li><a href='{{page.previous.url}}'>{{page.previous.title}}</a></li> |
| 40 | + {% endif %} |
| 41 | + </div> |
| 42 | + </div> |
| 43 | + {% endif %} |
| 44 | + |
| 45 | + <div class="relatedposts"> |
| 46 | + <div class="split"> |
| 47 | + <i>相关内容</i> |
| 48 | + <hr/> |
| 49 | + </div> |
| 50 | + <!--使用tag做为相关阅读,,也可以使用 category--> |
| 51 | + {% for post in site.related_posts limit:5 %} |
| 52 | + {% assign match = false %} |
| 53 | + {% for category in post.categories %} |
| 54 | + {% if page.categories contains category %} |
| 55 | + {% assign match = true %} |
| 56 | + {% endif %} |
| 57 | + {% endfor %} |
| 58 | + {% if match %} |
| 59 | + <li><a href="{{ post.url }}">{{ post.title }}</a></li> |
| 60 | + {% endif %} |
| 61 | + {% endfor %} |
| 62 | + </div> |
| 63 | + |
| 64 | + <div class="copyright" style="text-align: right;padding-top: 20px"> |
| 65 | + 本文永久链接地址:<a title="{{page.title}}" href="{{site.url}}{{page.url}}">{{site.url}}{{page.url}}</a>, 转载请注明来源!<br /> |
| 66 | + </div> |
| 67 | + |
| 68 | + <div class="date" style="text-align: right;color: #ccc"> |
| 69 | + Written on {{ page.date | date: "%Y, %m, %d" }} |
| 70 | + </div> |
| 71 | + |
| 72 | + {% include disqus.html %} |
| 73 | + |
| 74 | + {% if page.comments %} |
| 75 | + <!-- 多说评论框 start --> |
| 76 | + <div class="ds-thread" data-thread-key="{{page.pid}}" data-title="{{ page.title }}" data-url="{{page.url}}"></div> |
| 77 | + <!-- 多说评论框 end --> |
| 78 | + <!-- 多说公共JS代码 start (一个网页只需插入一次) --> |
| 79 | + <script type="text/javascript"> |
| 80 | + var duoshuoQuery = {short_name:"xguo"}; |
| 81 | + (function() { |
| 82 | + var ds = document.createElement('script'); |
| 83 | + ds.type = 'text/javascript';ds.async = true; |
| 84 | + ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js'; |
| 85 | + ds.charset = 'UTF-8'; |
| 86 | + (document.getElementsByTagName('head')[0] |
| 87 | + || document.getElementsByTagName('body')[0]).appendChild(ds); |
| 88 | + })(); |
| 89 | + </script> |
| 90 | + <!-- 多说公共JS代码 end --> |
| 91 | + {% endif %} |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | +</article> |
| 96 | + |
0 commit comments