diff --git a/README.md b/README.md index c0aadde9..07a79c41 100644 --- a/README.md +++ b/README.md @@ -73,15 +73,23 @@ archive_generator: ## 3.1. 基本配置 -`background` 参数是一个列表,打开时会随机加载一个背景。 +`homeBackground`和`contentBackground` 参数是一个列表,打开时会随机加载一个背景。 + +`homeBackground`是首页的背景,至少要有一张图片、`contentBackground`是内容,或者说整个网站的背景,默认为空,可置入任意数量的图片。 ```yaml # Avatar image avatar: /images/avatar.jpg # Home page background image -background: - - /images/background.jpg +homeBackground: + - /images/home-background.jpg + # - /images/home-background1.jpg + +# Content (or global) background image +contentBackground: + # - /images/content-background.jpg + # - /images/content-background1.jpg # Loading image loading: /images/loading.gif diff --git a/_config.yml b/_config.yml index ccac3cf7..3af32b2d 100644 --- a/_config.yml +++ b/_config.yml @@ -5,8 +5,12 @@ avatar: /images/avatar.jpg # Home page background image -background: - - /images/background.jpg +homeBackground: + - /images/home-background.jpg + +# Content (or global) background image +contentBackground: + # - /images/content-background.jpg # Loading image loading: /images/loading.gif diff --git a/layout/index.ejs b/layout/index.ejs index a0ea0276..ebe035c0 100644 --- a/layout/index.ejs +++ b/layout/index.ejs @@ -1,5 +1,5 @@