diff --git a/README.md b/README.md index 54818ab..6c650ab 100644 --- a/README.md +++ b/README.md @@ -94,6 +94,48 @@ layout: "tags" --- ``` +#### 🏖相册页 + +在根目录`source`文件夹下创建`galleries`文件夹,并新建`index.md`文件 + +``` +--- +title: galleries +date: 2023-02-22 07:33:36 +type: galleries +layout: galleries +--- +``` + +**创建新相册示例** + +> 可以直接将/themes/hexo-theme-quiet/galleries文件夹拷贝到/source下 + +在gallery文件夹下新建`sea`文件夹,并在其中新建`index.md`文件 + +添加图片: + +- 方式一:将图片上传到图床,直接填写图片url链接 + +- 方式二:将图片`sea1.jpg`拷贝到`sea`文件夹下,url填写为`/galleries/sea/sea1.jpg` +``` +--- +title: 这是your_gallery_name相册 +date: 2023-02-22 08:40:23 +type: gallery +layout: gallery +describe: 示例相册的相关介绍 +photos: + - url: '/galleries/sea/sea1.jpg' +--- +``` + +**解释** + +`describe`:相册简介 + +`photos` :照片地址 + #### 🏂简介页 进入根目录下的`source`文件夹下创建`about`文件夹新建`index.md`文件 diff --git a/_config.yml b/_config.yml index aa262bc..f14240d 100644 --- a/_config.yml +++ b/_config.yml @@ -20,6 +20,7 @@ menus_title: tags: TAGS links: LINKS about: ABOUT + galleries: GALLERIES # 导航 (不建议修改) menus: home: / @@ -27,6 +28,7 @@ menus: categories: /categories tags: /tags links: /links + galleries: /galleries about: /about # logo @@ -52,11 +54,16 @@ headers: message: "我和我的小伙伴们", icon: "https://cdn.jsdelivr.net/gh/duogongneng/MyBlogImg/imga20r7-cftji.svg" } + galleries: { + message: "相册", + icon: "/image/galleryIcon.png" + } categories: { message: "文章分类", icon: "https://cdn.jsdelivr.net/gh/duogongneng/MyBlogImg/imgblogmyCategory.svg" } + # 网页访问统计 web_analytics: enable: false #需要改为true @@ -93,3 +100,30 @@ linksList: # https://api.ixiaowai.cn/gqapi/gqapi.php # https://tuapi.eees.cc/api.php?type=302&category=fengjing default_cover: https://api.ixiaowai.cn/gqapi/gqapi.php + +galleries: + - { + title: sea相册, + # galleries下的相册文件夹名称 + dirname: 'sea', + cover: '/galleries/sea/sea1.jpg', + date: '2011-02-02' + } + - { + title: cloud相册, + dirname: 'cloud', + cover: '/galleries/cloud/cloud1.png', + date: '2012-02-02' + } + - { + title: mountain相册, + dirname: 'mountain', + cover: '/galleries/mountain/mountain1.png', + date: '2013-02-02' + } + - { + title: city相册, + dirname: 'city', + cover: 'https://api.ixiaowai.cn/gqapi/gqapi.php', + date: '2014-02-02' + } \ No newline at end of file diff --git a/galleries/index.md b/galleries/index.md new file mode 100644 index 0000000..34ff752 --- /dev/null +++ b/galleries/index.md @@ -0,0 +1,6 @@ +--- +title: galleries +date: 2023-02-22 07:33:36 +type: galleries +layout: galleries +--- diff --git a/galleries/sea/index.md b/galleries/sea/index.md new file mode 100644 index 0000000..0c692f5 --- /dev/null +++ b/galleries/sea/index.md @@ -0,0 +1,12 @@ +--- +title: 这是sea相册 +date: 2023-02-22 08:40:23 +type: gallery +layout: gallery +describe: 示例相册的相关介绍 +photos: + - url: '/galleries/sea/sea1.jpg' + - url: '/galleries/sea/sea1.jpg' + - url: '/galleries/sea/sea1.jpg' + - url: '/galleries/sea/sea1.jpg' +--- diff --git a/galleries/sea/sea1.jpg b/galleries/sea/sea1.jpg new file mode 100644 index 0000000..6dac366 Binary files /dev/null and b/galleries/sea/sea1.jpg differ diff --git a/layout/galleries.ejs b/layout/galleries.ejs new file mode 100644 index 0000000..47115d2 --- /dev/null +++ b/layout/galleries.ejs @@ -0,0 +1,144 @@ +<%- partial('_partial/header',{name:'galleries'}) %> + + + +