0
我最近開始從Jekyll(基於rails的框架)轉到Django,我剛剛開始。_config.yml相當於Django
我想弄清楚什麼相當於_config.yml(如果有的話)會在Django。對於那些在傑基爾沒有背景,_config.yml看起來有點像這樣:
# ----------------------- #
# Main Configs #
# ----------------------- #
markdown: rdiscount
pygments: true
permalink: /posts/:title
rdiscount:
extensions: [smart]
url: http://foo.bar
title: ./derp
subtitle: My code
author: Foo Bar
simple_search: http://google.com/search
description:
的這個功能是不是都寫一遍又一遍的網頁標題,網址,等...
謝謝!
事情是在_config.yml中,你可以像Twitter用戶,g +帳戶等這樣的值,所以每當你必須改變Twitter帳戶的名稱,它只需要在一個地方改變。 的想法是: 嘰嘰喳喳:@foo G +:plus.google.com/foobar 那麼你會用它打電話{{嘰嘰喳喳}}或{{G +}} – rcsole
@裏卡德鞋底對於這種情況你定義您自己的模板上下文處理器 – mariodev
謝謝,我將在文檔中查看它! – rcsole