2017-04-13 57 views
1

使用Pelican,python靜態網站生成器,我想重新排列頁面在導航中的顯示方式。在Pelican HTML頁面中使用PAGE_ORDER_BY ='page-order'

我的網頁是html,而不是markdown/reST。

根據& How can I control the order of pages from within a pelican article category?我應該使用的文檔: PAGE_ORDER_BY = '頁面順序'

在pelicanconf.py。

我試圖在我的HTML頁面下面的meta標籤,並用在每一頁的相同數量的格式爲:=「000」 =「111」等

<meta page-order="888"> 
<meta name="page-order" content="888"> 

我收到以下錯誤時編譯該網站: 項目元數據中沒有「頁面順序」屬性。默認爲slug命令。

在HTML頁面中指定頁面順序的正確方法是什麼?

在此先感謝。

在配置(沒有連字符)::

PAGE_ORDER_BY = 'sortorder' 

HTML頁面結構:

{% extends "base.html" %} 
<html> 
<head> 
    <title>Test</title> 
    <meta name="sortorder" content="222" /> 
</head> 
<body> 
</body> 
</html> 

鵜鶘去除的HTML /頭/體和用途

回答

0

按照此結構解決了這個那些包含在你的基本html中,但似乎需要這種結構來識別頭部中的元標記。 請確保在每個content =「」中使用相同數量的數字,例如。 111,222,333不是1,222,33。