0
A
回答
2
因爲你的問題是不完全清楚,我假設你有你想要顯示的帖子頁面上,而不是一堆職位在索引頁面上。在這裏,我認爲您可以在着陸頁上顯示帖子的標題,這樣當用戶點擊特定的鏈接/帖子時,他們可以在帖子頁面中完整地閱讀該帖子。要做到這一點,你可以這樣修改您的index.html:
---
layout: page
footer: false
sidebar: true
---
<div id="blog-archives">
{% for post in site.posts reverse %}
{% capture this_year %}{{ post.date | date: "%Y" }}{% endcapture %}
{% unless year == this_year %}
{% assign year = this_year %}
<h2>{{ year }}</h2>
{% endunless %}
<article>
{% include archive_post.html %}
</article>
{% endfor %}
</div>
<aside class="sidebar">
{% if site.blog_index_asides.size %}
{% include_array blog_index_asides %}
{% else %}
{% include_array default_asides %}
{% endif %}
</aside>
相關問題
- 1. 從所有隱藏的內容開始
- 2. 隱藏MVC頁面的內容
- 3. 隱藏母版頁內容
- 4. 頁腳不粘在頁面底部(隱藏內容)
- 5. 隱藏在頁面開始加載大量的JQuery
- 6. 溢出:隱藏隱藏在網頁上的所有內容
- 7. jquery - 我需要在新窗口中打開頁面上的隱藏內容
- 8. 從查看頁面隱藏母版頁中的內容
- 9. 如何在asp.net內容頁面中隱藏查詢字符串?
- 10. Drupal在form_alter中重定向/隱藏頁面內容
- 11. 隱藏在MasterPageTemplateHeader內容編輯器頁面的EdiatbleImageWebpart Kentico 9
- 12. 在固定div位置下滾動時隱藏頁面內容
- 13. jQuery不在內容頁面上提取隱藏字段值
- 14. 在主頁面中隱藏網頁內容表單上的所有面板
- 15. CSS展開,隱藏懸停內容
- 16. 隱藏所有RadToolTips頁面OnItemDrag從RadListView開始
- 17. 文件擴展名被隱藏,但在原始php內容中打開頁面鏈接?
- 18. 內容隱藏 - 單頁網站
- 19. Array.prototype.concat()隱藏內容
- 20. Windows Azure - 桌面服務 - 隱藏內容
- 21. 如何隱藏索引頁面上的內容並在帖子打開時顯示此內容?
- 22. 溢出隱藏隱藏所有內容
- 23. 隱藏iframe內的內容?
- 24. YUI3 Y.Panel - 頁面加載時如何隱藏HTML內容?
- 25. 顯示/隱藏內容不重新加載頁面
- 26. W3 CSS W3-導航欄與W3-頂部隱藏頁面內容
- 27. 如何使用內容頁面中的按鈕隱藏iframe?
- 28. Joomla 3隱藏來自特定頁面的內容
- 29. 隱藏jquery選項卡及其內容,直到頁面加載
- 30. 隱藏頁面內容,直到視頻中的具體時間
只是說明說,正確的液體語法倒車時迭代使用for循環指定'reversed'的元素,而不是反向' '(http://shopify.github.io/liquid/tags/iteration/#reversed) – 2017-01-08 13:46:06