Post photos to Gallery

How to post a photo to blog gallery

1
2
3
4
5
$ hexo new page gallery      // create 'gallery' page

$ hexo new page about // create 'about' page
$ hexo new page tags // 'tags' page
$ hexo new page categories // 'categories' page

2. Find the index.md and modify it.

After step 1, there will be folders named “gallery”, “about”… under /source/.

And you can find a file named “index.md” generated automatically under these folders.
Open and modify the front-matter part as :

1
2
3
4
5
6
7
---
title: Gallery
albums: [
["img_url","img_caption"],
["img_url","img_caption"]
]
---

use outer links can be a better way as internal insert of images will decrease loading speed.
(I haven’t find a good-way to insert as internal files, so I turned to use weibo-albums-link as alt… ).

There was something wrong that photos didn’t display successfully in mobile mode.

  • 190725 Update: Problem fixed with changing photo cloud storage from weibo to cloudinary. (weibo albums no longer support free external ref links)

same way to edit the “about” page